The media interface
Methods
# fastForward(paramopt)
To fastForward the media
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
param |
Object
|
Number
|
<optional> |
the fastForward param option or fastForward second |
multipleFactor |
Number
|
<optional> |
The multiple of increase in jump distance for each fastForward |
delaySecond |
Number
|
<optional> |
The second to be delayed before perform the actual fastForward |
progressiveCap |
Number
|
<optional> |
The maximum amount of second in each increase |
# async load(url, option) → {Promise}
To load the media by calling the player prepare and load async methods
Parameters:
Name | Type | Description |
---|---|---|
url |
String
|
the media url |
option |
PlayerOptions
|
the load option |
Fulfill once the content is loaded
Promise
# async play(second)
To play the media
Parameters:
Name | Type | Description |
---|---|---|
second |
Number
|
the play second |
# preload(url, option) → {Promise}
To preload media. Do not mount the video
Parameters:
Name | Type | Description |
---|---|---|
url |
String
|
the media url |
option |
PlayerOptions
|
the load option |
Fulfill once the content is loaded
Promise
# restore(option)
To restore the media
Parameters:
Name | Type | Description |
---|---|---|
option |
Object
|
extra option to pass to restore object |
# resume(second)
To seek the media
Parameters:
Name | Type | Description |
---|---|---|
second |
Number
|
the target seek position |
# rewind(paramopt)
To rewind the media
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
param |
Object
|
Number
|
<optional> |
the rewind param option or rewind second |
multipleFactor |
Number
|
<optional> |
The multiple of increase in jump distance for each rewind |
delaySecond |
Number
|
<optional> |
The second to be delayed before perform the actual rewind |
progressiveCap |
Number
|
<optional> |
The maximum amount of second in each increase |
# suspend(forceReset)
To suspend the media
Parameters:
Name | Type | Description |
---|---|---|
forceReset |
Boolean
|
boolean to force reset player when suspending |