id='gplayer'
parameter to the iFrame and paste it into the site code.
Example of the iFrame code from the Gcore Customer Portal with the id= ‘gplayer’ parameter:
Event | Returns | Description |
---|---|---|
ready | Fired when playback is ready | |
play | Fired when player starts to play | |
pause | Fired when player is paused | |
seek | the current time in seconds | Fired when player seeks the video |
resize | the object with the current size | Fired when player is resized |
fullscreen | true/false | Fired when the player is switched to the full screen mode |
timeupdate | data progress object | Fired when the time is updated on player |
volumeupdate | current volume level | Fired when player’s volume is updated |
error | error | Fired when player receives an error |
ended | Fired when player ends the video | |
stop | Fired when player stops |
Method name | Data type | Description |
---|---|---|
getCurrentTime | Number | The current time in seconds |
getDuration | Number | The duration time in seconds |
getVolume | Number | Volume. Value from 0 (sound off, mute) to 100 (maximum volume) |
isDvrEnabled | Boolean | Shows DVR service status: true - DVR is enabled, false - DVR is disabled |
isPlaying | Boolean | Checks if the player is playing: true - the current source is playing, false - playback is off/stopped/not started |
mute | Turns off the sound | |
unmute | Turns on the sound | |
pause | Pauses playback | |
play | Starts playback | |
resize | Object | Modifies the canvas of the player |
seek | Number | Rewinds playback (seconds). For example, player.seek(120) rewinds the video and starts at 2 minutes |
seekPercentage | Number | Rewinds playback (percent). For example, player.seek(50) rewinds the video and starts playing from the middle of the video |
setVolume | Number | Sets the volume for the current video |
stop | Stops playback of the current video |