Constructor
new UiVideoPlayer(target, options)
Build a video player based on Shaka Player and include it to a target element.
Parameters:
Name | Type | Description |
---|---|---|
target |
string/HTMLElement | HTML target element. |
options |
Object.<string, Array> | Dictionary with input configuration for the player. The configuration can be set for the keys media, thumbnail, cover and poster. They contain the respective urls. If media is a list, the player will try to play the next item if the previous ones failed.
Example: const options = { 'media': ['https://.../stream/master.mpd', 'https://.../stream/master.m3u8'], 'thumbnail': 'https://.../thumbnail/master.vtt', 'cover': 'https://.../cover/image.webp, 'poster': 'https://.../poster/image.jpg', } |
- Source:
Extends
- UiElement
Methods
dispose()
Remove the video player completely.
- Source: