Members
(constant) Events
- Source:
Methods
changeRate(data, callback)
Change the rate of the video source, such as 720P, HD...
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The url of the video source |
callback |
function | Function to handle after changing the video source |
changeSpeed(data)
Change the playback speed, such as 1, 0.5, 1.5, 2...
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | data.value, The value of playback speed |
changeSrc(url, callback)
Change the source of the video to play
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The url of the video source |
callback |
function | Function to handle after changing the video source |
destroy()
destroy the instance of Class Player
getComponent(name)
get the component registered in components map
Parameters:
Name | Type | Description |
---|---|---|
name |
String | component name |
- Source:
pause()
pause the video
play()
play the video
registerComponent(name, componentToAdd, posopt, indexopt)
register the new component to components map and it will be instantiated and rendered when player is inited
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
String | component name | ||
componentToAdd |
Class | The component class defined by user | ||
pos |
String |
<optional> |
right | Which side of control bar |
index |
number |
<optional> |
-1 | Display index, last by default |
- Source:
seek(time)
seek time to play
Parameters:
Name | Type | Description |
---|---|---|
time |
number | the duration of seeking |