new module:vLite/Player/PlayerHtml5(selector, options, callback)
Instanciate the constructor
Parameters:
| Name | Type | Description |
|---|---|---|
selector |
String | Object | CSS selector or query selector |
options |
Object | Player options |
callback |
function | Callback function executed when the player is ready |
- Source:
Methods
bindSpecificEvents()
Create event listeners All listeners are created on class properties to facilitate the deletion of events
- Source:
getCurrentTime() → {Float|Integer}
Get the player current time
- Source:
Returns:
Current time of the video
- Type
- Float | Integer
getDuration() → {Float|Integer}
Get the player duration
- Source:
Returns:
Duration of the video
- Type
- Float | Integer
getInstance() → {Object}
Get the player instance
- Source:
Returns:
Video element
- Type
- Object
methodMute()
Mute method of the player
- Source:
methodPause()
Pause method of the player
- Source:
methodPlay()
Play method of the player
- Source:
methodUnMute()
Unmute method of the player
- Source:
onPlayerReady()
Function executed when the player is ready
- Source:
onPlaying()
Function executed when the video is playing
- Source:
onProgressChanged(e)
Function executed on the video progress changed
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Object | Event listener datas |
- Source:
onSeeked()
Function executed when the video seek is done
- Source:
onSeeking()
Function executed when the video is seeking
- Source:
onWaiting()
Function executed when the video is waiting
- Source:
setCurrentTime(Current)
Set the new current time for the player
Parameters:
| Name | Type | Description |
|---|---|---|
Current |
Float | Integer | time video |
- Source:
unBindSpecificEvents()
Unbind event listeners
- Source:
waitUntilVideoIsReady() → {Promise}
Wait until the video is ready
- Source:
Returns:
Loading of the video with a Promise
- Type
- Promise