IPlayer interface
Represents audio player interface to control the audio playback, such as pause, resume, etc.
Properties
current |
Gets the current play audio offset. |
on |
Defines event handler audio playback end event. |
on |
Defines event handler audio playback start event. |
Methods
pause() | Pauses the audio playing |
resume(() => void, (error: string) => void) | Resumes the audio playing |
Property Details
currentTime
Gets the current play audio offset.
public currentTime: number
Property Value
number
The current play audio offset, in second
onAudioEnd
Defines event handler audio playback end event.
public onAudioEnd: (sender: IPlayer) => void
Property Value
(sender: IPlayer) => void
onAudioStart
Defines event handler audio playback start event.
public onAudioStart: (sender: IPlayer) => void
Property Value
(sender: IPlayer) => void
Method Details
pause()
Pauses the audio playing
function pause()
resume(() => void, (error: string) => void)
Resumes the audio playing
function resume(cb?: () => void, err?: (error: string) => void)
Parameters
- cb
-
() => void
- err
-
(error: string) => void