Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Controller

逻辑控制器:内部状态。

Hierarchy

Index

Constructors

Properties

$five?: Five
configs?: PlayerConfigs
drawerConfig: null | { content: string | Element; height?: string | number } = null
ended: boolean = false
playing: boolean = false
popUp: null | string | Element = null
stopInterval?: () => void

Type declaration

    • (): void
    • Returns void

videoAgentScene?: VideoAgentScene
visible: boolean = false
vreoUnit?: VreoUnit

Accessors

  • get currentTime(): number
  • get isAudio(): boolean
  • get ready(): boolean
  • get videoInstance(): undefined | HTMLAudioElement | AudioLike

Methods

  • dispose(): void
  • 触发事件

    Type parameters

    • K: VreoKeyframeEnum | "loaded" | "paused" | "playing" | "unknownKeyframeType" | "ended"

      预设的监听事件名称

    Parameters

    • name: K

      事件类型

    • Rest ...data: Parameters<VreoKeyframeEvent[K]>

      触发事件的数据

    Returns boolean

    canceled 是否被触发取消

  • hasListener(name: VreoKeyframeEnum | "loaded" | "paused" | "playing" | "unknownKeyframeType" | "ended"): boolean
  • 判断是否注册了事件

    Parameters

    • name: VreoKeyframeEnum | "loaded" | "paused" | "playing" | "unknownKeyframeType" | "ended"

      事件类型

    Returns boolean

  • 解除事件

    如果 name 不传的话解除对应所有事件 如果 name, callback 不传的话解除所有name的所有事件

    Type parameters

    • K: VreoKeyframeEnum | "loaded" | "paused" | "playing" | "unknownKeyframeType" | "ended"

      预设的监听事件名称

    Parameters

    Returns void

  • 注册事件

    Type parameters

    • K: VreoKeyframeEnum | "loaded" | "paused" | "playing" | "unknownKeyframeType" | "ended"

      预设的监听事件名称

    Parameters

    Returns () => void

    解除事件

      • (): void
      • 注册事件

        Returns void

        解除事件

  • 注册事件(是否只执行一次)

    Type parameters

    • K: VreoKeyframeEnum | "loaded" | "paused" | "playing" | "unknownKeyframeType" | "ended"

      预设的监听事件名称

    Parameters

    Returns () => void

    解除事件

      • (): void
      • 注册事件(是否只执行一次)

        Returns void

        解除事件

  • openDrawer(drawerConfig?: false | { content: string | Element; height?: string | number }): void
  • openPopUp(popUp: string | false | Element): void
  • setEnded(ended: boolean): void
  • setPlaying(playing: boolean): void
  • setVisible(v: boolean): void