A-Tractor - v2.3.1
    Preparing search index...

    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.

    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' });

    See more options at interface definition: IMediaTimePointerOptions

    Index

    Constructors

    Methods

    Constructors

    • Constructor

      Parameters

      • mediaElement: HTMLMediaElement

        Input HTML element with source audio or video.

      • viewElement: HTMLElement

        The parent container to append the time pointer.

      • Optionaloptions: IMediaTimePointerOptions

        Option params.

      Returns MediaTimePointer

    Methods

    • Removes all constructed elements and event listeners.

      Returns void

    • Updates the canvas size depended on the [[constructor|viewElement]] size.

      Returns void