Warning: Declaration of WPRC_Plugins_API::renderAdditionalSearchUI() should be compatible with WPRC_Extensions_API::renderAdditionalSearchUI($extension_type) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-plugins-api.php on line 240

Warning: Declaration of WPRC_Plugins_API::extensionApiArgsQueryExtensions($args) should be compatible with WPRC_Extensions_API::extensionApiArgsQueryExtensions($args, $per_page) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-plugins-api.php on line 240

Warning: Declaration of WPRC_Plugins_API::extensionsApi($state, $action, $args) should be compatible with WPRC_Extensions_API::extensionsApi($state, $action, $args, $extension_type) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-plugins-api.php on line 240

Warning: Declaration of WPRC_Extensions_API_Decorator::renderAdditionalSearchUI() should be compatible with WPRC_Extensions_API::renderAdditionalSearchUI($extension_type) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-extensions-api-decorator.php on line 62

Warning: Declaration of WPRC_Extensions_API_Decorator::extensionsApi($state, $action, $args) should be compatible with WPRC_Extensions_API::extensionsApi($state, $action, $args, $extension_type) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-extensions-api-decorator.php on line 62

Warning: Declaration of WPRC_Themes_API::renderAdditionalSearchUI() should be compatible with WPRC_Extensions_API::renderAdditionalSearchUI($extension_type) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-themes-api.php on line 227

Warning: Declaration of WPRC_Themes_API::extensionsApi($state, $action, $args) should be compatible with WPRC_Extensions_API::extensionsApi($state, $action, $args, $extension_type) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-themes-api.php on line 227

Warning: Cannot modify header information - headers already sent by (output started at /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/installer/classes/api/wprc-plugins-api.php:240) in /home/brainh7/brainhive-ethical-marketing.com/wp-content/plugins/wordtube/javascript/statistic.js.php on line 6
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://www.brainhive-ethical-marketing.com/index.php?wt-stat=true" }); } }