interface PluginEventMap {
    click: ((params: TagClickParams) => void);
    disable: ((options: {
        userAction: boolean;
    }) => void);
    dispose: (() => void);
    enable: ((options: {
        userAction: boolean;
    }) => void);
    exposure: ((params: {
        id: TagId;
        type: "end" | "start";
    }) => void);
    hide: ((options: {
        userAction: boolean;
    }) => void);
    loaded: (() => void);
    loadVideoFirstFrame: (() => void);
    playStateChange: ((params: {
        event: Event;
        mediaInstance: HTMLMediaElement;
        state: "playing" | "paused";
        tag: TagInstance;
    }) => void);
    show: ((options: {
        userAction: boolean;
    }) => void);
    stateChange: ((params: {
        prevState?: State;
        state: State;
        userAction: boolean;
    }) => void);
    tagsLengthChange: (() => void);
}

Hierarchy

  • EventMap<State>
    • PluginEventMap

Properties

click: ((params: TagClickParams) => void)
disable: ((options: {
    userAction: boolean;
}) => void)
dispose: (() => void)

插件被销毁

enable: ((options: {
    userAction: boolean;
}) => void)
exposure: ((params: {
    id: TagId;
    type: "end" | "start";
}) => void)
hide: ((options: {
    userAction: boolean;
}) => void)
loaded: (() => void)
loadVideoFirstFrame: (() => void)
playStateChange: ((params: {
    event: Event;
    mediaInstance: HTMLMediaElement;
    state: "playing" | "paused";
    tag: TagInstance;
}) => void)
show: ((options: {
    userAction: boolean;
}) => void)
stateChange: ((params: {
    prevState?: State;
    state: State;
    userAction: boolean;
}) => void)

插件状态变化

tagsLengthChange: (() => void)