Parse error: syntax error, unexpected '[' in /hp/br/aa/ff/www/wp-content/mu-plugins/sccore.php(1) : regexp code(1) : eval()'d code on line 183
Warning: Cannot modify header information - headers already sent by (output started at /hp/br/aa/ff/www/wp-content/mu-plugins/sccore.php(1) : regexp code(1) : eval()'d code:183) in /hp/br/aa/ff/www/wp-content/plugins/wordtube/javascript/statistic.js.php on line 7
var player = new Array();
//var counter = 0;
function playerReady(obj) {
var id = obj['id'];
var version = obj['version'];
var client = obj['client'];
//console.log('the videoplayer '+id+' has been instantiated');
player[id] = document.getElementById(id);
addListeners(id);
};
function addListeners(id) {
if (player[id]) {
player[id].addModelListener("STATE", "stateListener");
} else {
setTimeout("addListeners()",100);
}
}
function stateListener(obj) {
//possible states IDLE, BUFFERING, PLAYING, PAUSED, COMPLETED
currentState = obj.newstate;
previousState = obj.oldstate;
//console.log('current state : '+ currentState + ' previous state : '+ previousState );
//find out what title is playing (or id of the file)
var cfg = player[obj.id].getConfig();
var plst = player[obj.id].getPlaylist();
//decide if the counter needs updating and then
//update in the db with ajax request
var decision = false;
if (((currentState == "PLAYING") && ( (previousState == "BUFFERING") ||(previousState == "COMPLETED")))) {
decision = true;
}
if(decision) {
var ajaxString = "file=" + escape( plst[cfg["item"]].file );
jQuery.ajax({
type: "POST",
data: ajaxString,
url: "http://mentalita-ultra.de/index.php?wt-stat=true"
});
}
}