Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Controller

逻辑控制器:内部状态。

Hierarchy

Index

Constructors

constructor

Properties

Optional $five

$five?: Five

Optional configs

configs?: PlayerConfigs

drawerConfig

drawerConfig: null | { content: string | Element; height?: string | number } = null

playing

playing: boolean = false

popUp

popUp: null | string | Element = null

Optional stopInterval

stopInterval?: () => void

Type declaration

    • (): void
    • Returns void

Optional videoAgentScene

videoAgentScene?: VideoAgentScene

visible

visible: boolean = false

Optional vreoUnit

vreoUnit?: VreoUnit

Accessors

currentKeyframes

currentTime

  • get currentTime(): number

isAudio

  • get isAudio(): boolean

ready

  • get ready(): boolean

videoInstance

  • get videoInstance(): undefined | HTMLAudioElement

Methods

dispose

  • dispose(): void

emit

  • 触发事件

    Type parameters

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

      预设的监听事件名称

    Parameters

    • name: K

      事件类型

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

      触发事件的数据

    Returns boolean

    canceled 是否被触发取消

hasListener

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

    Parameters

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

      事件类型

    Returns boolean

off

  • 解除事件

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

    Type parameters

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

      预设的监听事件名称

    Parameters

    Returns void

on

  • 注册事件

    Type parameters

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

      预设的监听事件名称

    Parameters

    Returns () => void

    解除事件

      • (): void
      • 注册事件

        Returns void

        解除事件

once

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

    Type parameters

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

      预设的监听事件名称

    Parameters

    Returns () => void

    解除事件

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

        Returns void

        解除事件

openDrawer

  • openDrawer(drawerConfig?: false | { content: string | Element; height?: string | number }): void

openPopUp

  • openPopUp(popUp: string | false | Element): void

requestAnimationFrameLoop

run

setPlaying

  • setPlaying(playing: boolean): void

setVisible

  • setVisible(v: boolean): void