Media time pointer widget.
Class to create an audio or video time pointer control that displays the current time position and allows it to be changed.
The time pointer for mediaElement will be auto drawn and appended inside the viewElement as child element.
mediaElement
viewElement
Example:
const mediaElement = document.getElementById('audio');const viewElement = document.getElementById('div-analyzer');// Line time pointer:const mediaTimePointer1 = new MediaTimePointer(mediaElement, viewElement);// or// Bar time pointer:const mediaTimePointer2 = new MediaTimePointer(mediaElement, viewElement, { mode: 'bar', pointerStyle: { background: '#0f0a' }); Copy
const mediaElement = document.getElementById('audio');const viewElement = document.getElementById('div-analyzer');// Line time pointer:const mediaTimePointer1 = new MediaTimePointer(mediaElement, viewElement);// or// Bar time pointer:const mediaTimePointer2 = new MediaTimePointer(mediaElement, viewElement, { mode: 'bar', pointerStyle: { background: '#0f0a' });
See more options at interface definition: IMediaTimePointerOptions
Constructor
Input HTML element with source audio or video.
The parent container to append the time pointer.
Optional
Option params.
Removes all constructed elements and event listeners.
Updates the canvas size depended on the [[constructor|viewElement]] size.
Media time pointer widget.
Class to create an audio or video time pointer control that displays the current time position and allows it to be changed.
The time pointer for
mediaElementwill be auto drawn and appended inside theviewElementas child element.Example:
See more options at interface definition: IMediaTimePointerOptions