Spent hours the last few days digging through the forums, documentation, and WIKI to see if I could find some answers. Unofrtunately, thus far, the data is sparse. Can somebody direct me to some documentation on the Javascript API and what events ara available to control the player? For example, how do I send the player an event to "mute" the volume? Or, how do I send the player an event to "seek" to a point in time in the video? Or, how do I "listen" for a point in time in the video and then use javascript to do something else (like play another clip).
I have found some very sparse information on the use of JQuery, but, we do not use that (at least, not yet). Simple javascript through an API is ideal. Any help would be greatly appreciated.
Hi,
The JavaScript API in Strobe Media Playback is exploratory. It will likely change in future releases.
The best 'documentation' we have is our samples. You can find the samples in the html-template directory if you download the source zip. You can also check the source code of the live samples: http://osmf.org/dev/1.5gm/
The simplest sample is this one:
http://osmf.org/dev/1.5gm/hello-world-javascript.html
As you'll see in the source code, you'll need to pass the name to a JavaScript callback function which we'll handle all the player state changes.
For calling a method in the StrobeMediaPlayback embedded player, you need to call one of the MediaPlayer public APIs methods:
player = document.getElementById(playerId);
player.mute();
player.seek(100);
Note that play got renamed to play2() - because of some security restrictions in IE.
You can also access the public properties in MediaPlayer, by calling a getter or setter function:
var state = player.getState();
player.setVolume(0.5);
In future we'll probably explore more around the approach we currently have used inside the jQuery plug-in, so if you have more time, I'll recommend you take a closer look at that implementation.
Sorry for not documenting this - we'll catch up on this as we get closer to a stable implementation.
-Andrian
You can also check this slightly outdated wiki page: http://sourceforge.net/adobe/smp/wiki/JavaScript%20API/
Or my presentation for some context around the jQuery plugin: http://experts.na3.acrobat.com/p41481809/
Again, I promise we'll get proper docs up once we get to a stable API.
-Andrian
One final question (for now): Is there somewhere that clearly illustrates the differences between 1.0 and 1.5? We did some significant customizations to 1.0 (network tolerance moduel, soundTransform for multi language, keypress capture and report to javascript) and want to make sure we are able to migrate over to 1.5 pretty quickly as we absolutely need Javascript API support (playlists, subclipping, advanced player functionality [ replay ].
Again, thank you for all your assistacne.
Hi,
The only difference that might impact the speed at which you migrate to 1.5 is related to the configuration architectural changes. If you didn't add additional configuration settings you should not be impacted.
Otherwise, the other new features are additions on top of the 1.0 codebase.
-Andrian
Hi MR_FASTH,
In Strobe Media Playback 1.0 we don't expose the JavaScript API at all. You won't be able to interact with the player or register events with the player unless you update your player to the latest, 1.5 version.
Does this answer your question?
-Andrian
One hundred percent. Thank you!
Regards,
Marc Ruskin, President
FASTHockey, Inc.
www.FASTHockey.com
About FASTHockey
FASTHockey (www.FASTHockey.com) is the premier online destination to see live streaming video of amateur ice hockey games from across North America. The feature rich platform is frequented by scouts, recruiters, coaches, players, parents, and fans from around the world. Hockey fans can not only see live and archived games, but also build robust profiles, research and track teams, get updates on recent scores & news, and monitor college commitments.
I m not able to access this.
http://sourceforge.net/adobe/smp/wiki/JavaScript%20API/
Can you please help me.
Thanks & Regards
Vishal Lad
North America
Europe, Middle East and Africa
Asia Pacific