All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.web.dom.TextTrackCue Maven / Gradle / Ivy

package js.web.dom;

import org.teavm.jso.JSBody;
import org.teavm.jso.JSProperty;

import javax.annotation.Nullable;

/**
 * TextTrackCues represent a string of text that will be displayed for some duration of time on a TextTrack. This includes the start and end times that the cue will be displayed. A TextTrackCue cannot be used directly, instead one of the derived types (e.g. VTTCue) must be used.
 */
public interface TextTrackCue extends EventTarget {
    @JSBody(script = "return TextTrackCue.prototype")
    static TextTrackCue prototype() {
        throw new UnsupportedOperationException("Available only in JavaScript");
    }

    @JSBody(params = {"startTime", "endTime", "text"}, script = "return new TextTrackCue(startTime, endTime, text)")
    static TextTrackCue create(double startTime, double endTime, String text) {
        throw new UnsupportedOperationException("Available only in JavaScript");
    }

    @JSProperty
    double getEndTime();

    @JSProperty
    void setEndTime(double endTime);

    @JSProperty
    String getId();

    @JSProperty
    void setId(String id);

    @JSProperty
    @Nullable
    EventListener getOnenter();

    @JSProperty
    void setOnenter(EventListener onenter);

    default void addEnterEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("enter", listener, options);
    }

    default void addEnterEventListener(EventListener listener, boolean options) {
        addEventListener("enter", listener, options);
    }

    default void addEnterEventListener(EventListener listener) {
        addEventListener("enter", listener);
    }

    default void removeEnterEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("enter", listener, options);
    }

    default void removeEnterEventListener(EventListener listener, boolean options) {
        removeEventListener("enter", listener, options);
    }

    default void removeEnterEventListener(EventListener listener) {
        removeEventListener("enter", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnexit();

    @JSProperty
    void setOnexit(EventListener onexit);

    default void addExitEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("exit", listener, options);
    }

    default void addExitEventListener(EventListener listener, boolean options) {
        addEventListener("exit", listener, options);
    }

    default void addExitEventListener(EventListener listener) {
        addEventListener("exit", listener);
    }

    default void removeExitEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("exit", listener, options);
    }

    default void removeExitEventListener(EventListener listener, boolean options) {
        removeEventListener("exit", listener, options);
    }

    default void removeExitEventListener(EventListener listener) {
        removeEventListener("exit", listener);
    }

    @JSProperty
    boolean isPauseOnExit();

    @JSProperty
    void setPauseOnExit(boolean pauseOnExit);

    @JSProperty
    double getStartTime();

    @JSProperty
    void setStartTime(double startTime);

    @JSProperty
    String getText();

    @JSProperty
    void setText(String text);

    @JSProperty
    TextTrack getTrack();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy