Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Frequency.Player();
Frequency.Player(
   undefined, {
      video: {
      },
      events: {
      },
      (...)
   }
);

Player Methods

play

Code Block
play();
pause();
seekTo(time:Number);
getDuration();
getState();
getCurrentTime();
loadVideo(url:String);
addEventListener(event:String, callback:String);
removeEventListener(event:String, callback:String);

play

Code Block
play()

Plays the currently loaded video.

Parameters:

None

Returns:

void

pause

Pauses the currently playing video.

Return Type

Parameters

Description

 

seekTo

 

Return Type

Parameters

 

getDuration

 

Return Type 

Parameters

 

getState

 

Return Type

 

Parameters

 

 

Plays the currently loaded video.

Parameters:

None

Returns:

void

pause

Code Block
pause()

Pauses the currently playing video.

Parameters:

None

Returns:

void


seekTo

Code Block
seekTo(time:Number)

Seeks to a specified time in the video.

Parameters:

time - The time position (in seconds) in the video to jump to. 

Returns:

void

 

getDuration

 
Code Block
getDuration()
 

Returns the duration of the currently playing video in seconds.

 

Parameters:

 

None

 

Returns:

 

Number - The video duration in seconds.

 

getState

 

Code Block
getState()

 

Returns the video player's current play state.

 

Parameters:

 

None

 

Returns:

 

Number - The number representing the video playback state. (see video states).

 

getCurrentTime

 

Code Block
getCurrentTime()

 

Returns the lapsed time since the video start in seconds.

 

Parameters:

 

None

 

Returns:

 

Number - The lapsed video playback time in seconds.

 

loadVideo

 

Code Block
loadVideo(url:String)

 

Loads the video url specified by the url string. This does not auto play the video. The onMediaReady event would need to be monitored along with a subsequent video play() method call to cause the loaded video to play.

 

Parameters:

 

url - The url of the video to load.

 

Returns:

 

void

 

play

 

Code Block
play()

 

Plays the currently loaded video.

 

Parameters:

 

None

 

Returns:

 

void

 





Play

Return Type


Player Events

...