Video player components can be added to any HTML5 banner that requires video.
File body.html must include a container for the player with a defined width and height.
Module ‘player’ listed as a function parameter.
Method create() creates an object with parameters that are described below.
Parameter | Value | Description |
---|---|---|
src | String | URL of a video source; format of a video file: .mp4 |
canSkip | Boolean ǀ Number (sec) | skip video (Skip button in the upper right corner), false (default); number of seconds to the Skip button activation |
skipText | String | text for the Skip button |
loop | Boolean | used when a video must loop; false (default) |
canFullscreen | Boolean | enable fullscreen mode |
container | object HTML Node | container for video player to be placed in |
Method | Arguments | Description |
---|---|---|
player.appendTo(); | object HTML Node | player is appended to an indicated container |
player.volume(); | Number (1-100) | the volume of sound; 50% by default |
player.unmute(); | – | turn sound on |
player.mute(); | – | turn sound off |
player.play(); | – | play a current video |
player.pause(); | – | pause a current video |
player.hide(); | – | hide a player |
player.src(); | String | reset a current player video source |
player.src().play(); | String | play a new video |
player.on(event, callback); | Function | function call on event. Available events:
|
player.node.sound.hide(); | – | hide Sound control |
player.node.playPause.hide(); | – | hide Play/Pause control |
player.node.progress.hide(); | – | hide Progress bar |
create() | Object | player initialization |