Quantcast
Channel: Adobe Community: Message List - Javascript API and Player Control
Viewing all articles
Browse latest Browse all 43

Re: Javascript API and Player Control

$
0
0

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


Viewing all articles
Browse latest Browse all 43

Latest Images

Trending Articles





Latest Images