Component to control playing process of media source.
It adds CSS classes (like play, pause, ended, error) to the control (set as viewElement) depending on the state of mediaElement.
play
pause
ended
error
viewElement
mediaElement
Additionally it can listen to the 'click' event on viewElement and trigger mediaElement state to play or pause.
Constructor
Input HTML element with source media (audio|video).
The HTML container to control.
Optional
Option params.
Removes all their own event listeners.
Component to control playing process of media source.
It adds CSS classes (like
play,pause,ended,error) to the control (set asviewElement) depending on the state ofmediaElement.Additionally it can listen to the 'click' event on
viewElementand triggermediaElementstate toplayorpause.