currentTime n/a
time n/a
defaultPlaybackRate 1
duration n/a
ended n/a
paused n/a
muted n/a
volume n/a
seeking n/a
networkState n/a
readyState n/a
bufferedBytesStart 0
bufferedBytesEnd n/a
bytesTotal 0
videoWidth 0
videoHeight 0

Step 1: Instantiation

Create the swf object and provide the name of the JavaScript function that's called when the player has been instanced with a 'readyFunctionName' flashvars parameter.

(the src and autoplay properties are able to be set at this time, but we won't do that here)

Create the SWF

Step 2: Configuration & Playback

Once the swf has been fully instanced, we have access to all of its methods and properties.

Let's set some basic properties:

  • eventProxyFunction: "onSWFEvent"
  • errorEventProxyFunction: "onSWFErrorEvent"
  • poster: "img/testPattern_ussr_480x360.png"
Set Properties

Next, we'll call src() to let the swf know where the media asset can be found:

src("http://video-js.zencoder.com/oceans-clip.mp4?")

If the SWF's autoplay property had been set to true at any point prior to this src() call, loading and playback would begin.

To begin loading without playing, call load():

load()

To begin playback, call play():

play()

Step 3: Control

Once playback has started, the SWF's control methods will work:

pause() resume()
seek(5) seek(10) seek(15)
enlarge reduce