interface EventMap {
    broke: (() => void);
    dataChange: ((data: CruisePluginTypes.PluginData, prevData?: CruisePluginTypes.PluginData) => void);
    dataLoaded: ((data: CruisePluginTypes.PluginData) => void);
    disable: ((options: {
        userAction: boolean;
    }) => void);
    dispose: (() => void);
    enable: ((options: {
        userAction: boolean;
    }) => void);
    end: (() => void);
    hide: ((options: {
        userAction: boolean;
    }) => void);
    pause: ((options: {
        userAction: boolean;
    }) => void);
    play: ((options: {
        userAction: boolean;
    }) => void);
    playIndexChange: ((index: number, keyframe: CruiseKeyframe) => void);
    playStateChange: ((playingState: "pause" | "playing", options: {
        userAction: boolean;
    }) => void);
    progressChange: ((progress: number) => void);
    show: ((options: {
        userAction: boolean;
    }) => void);
    speedChange: ((speed: number, options: {
        userAction: boolean;
    }) => void);
    stateChange: ((params: {
        prevState?: CruisePluginTypes.PluginState;
        state: CruisePluginTypes.PluginState;
        userAction: boolean;
    }) => void);
}

Hierarchy

Properties

broke: (() => void)

播放被手势操作打断,同时会触发 ”pause“ 事件

dataChange: ((data: CruisePluginTypes.PluginData, prevData?: CruisePluginTypes.PluginData) => void)

数据变更

dataLoaded: ((data: CruisePluginTypes.PluginData) => void)

数据加载完成

disable: ((options: {
    userAction: boolean;
}) => void)

关闭

dispose: (() => void)

插件被销毁

enable: ((options: {
    userAction: boolean;
}) => void)

开启

end: (() => void)

播放结束

hide: ((options: {
    userAction: boolean;
}) => void)

隐藏

pause: ((options: {
    userAction: boolean;
}) => void)

暂停播放,相当于 playStateChange: ('pause') => void

play: ((options: {
    userAction: boolean;
}) => void)

开始播放,相当于 playStateChange: ('playing') => void

playIndexChange: ((index: number, keyframe: CruiseKeyframe) => void)

播放的帧改变,index表示开始播放第{index}个帧

playStateChange: ((playingState: "pause" | "playing", options: {
    userAction: boolean;
}) => void)

播放状态改变,playingState: playing 表示播放;pause 表示暂停

progressChange: ((progress: number) => void)

MovePlugin 自定义路线漫游时,progress 更新时触发,范围 0~1

show: ((options: {
    userAction: boolean;
}) => void)

展示

speedChange: ((speed: number, options: {
    userAction: boolean;
}) => void)

播放速度改变,speed表示播放速度

stateChange: ((params: {
    prevState?: CruisePluginTypes.PluginState;
    state: CruisePluginTypes.PluginState;
    userAction: boolean;
}) => void)

插件状态变化