Differences

This shows you the differences between two versions of the page.

player-api [2010/03/18 15:15]
wistia
player-api [2010/07/27 18:56] (current)
wistia
Line 1: Line 1:
 +If you're just looking for a quick demo of the API in action, check this out:
 +[[http://wistia.com/pages/video_player_api]]
 +
====== Wistia Video Player API ====== ====== Wistia Video Player API ======
Line 7: Line 10:
  * **''getCurrentTime()''** - This returns the viewer's current position in the video (in seconds)   * **''getCurrentTime()''** - This returns the viewer's current position in the video (in seconds)
  * **''getCurrentState()''** - This returns the current state of the video player: unstarted (-1), ended (0), playing (1), paused (2).   * **''getCurrentState()''** - This returns the current state of the video player: unstarted (-1), ended (0), playing (1), paused (2).
 +  * **''getVolume()''** - Returns the current volume level.  Value between 0 and 100.
 +  * **''setVolume(level)''** - Sets the current volume level.  'level' is an integer value between 0 and 100.
 +  * **''getDuration()''** - Returns the length of the video in seconds.
To use these functions, you will need to reference the video object.  With the straight embed code from Wistia, it can be referenced by the **''id''** attribute in the **''object''** tag which is the same as the **''name''** attribute in the **''embed''** tag. To use these functions, you will need to reference the video object.  With the straight embed code from Wistia, it can be referenced by the **''id''** attribute in the **''object''** tag which is the same as the **''name''** attribute in the **''embed''** tag.