javascriptdebuggingosmfsmp

Getting statistics from Strobe Media Playback using Javascript


I am attempting to get statistics data from a Strobe Media Playback flash player.

I have looked at this example, however it uses swfobject.js and .embedSWF() to create the player. I create the player in HTML and attach a Javascript Bridge.

From what I can tell, the example uses org.osmf.player.debug.track to get hold of the statistics. Attempting to use this in my code brings no results. Presumably because I am not using swfobject.js to create the video. I have also tried something similar to this (truncated for clarity):

// Create player in HTML
<object id='player' data='strobe-1.6.swf'></object>

// Javascript links  to player
var player = document.getElementById('player');

// Attempt to access debug data (JS does not continue beyond this point)
player.debug.track = function(jss) {
  alert(jss);
}

The question is, am I able to get these statistics?


Solution

  • Solved. I placed the org.osmf.player.debug.track code in onLoad. It needed to be set before onLoad.