Video player class

视频播放器类

构造函数

属性

allowBackground: boolean = false

Whether to allow the video to continue playing in the background。

视频是否允许在后台继续播放。

options: IVideoPlayerOptions = {}

Video player options

视频播放器选项

访问器

  • get duration(): number
  • 返回 number

    The duration of the video in seconds. Available after the ready event is triggered.

    视频长度(秒)。ready 事件触发后可用。

  • get playbackRate(): number
  • 返回 number

    The current playback speed of the audio/video. For example:

    • 1.0: Normal speed
    • 0.5: Half speed (slower)
    • 2.0: Double speed (faster)
    • -1.0: Backwards, normal speed
    • -0.5: Backwards, half speed Note: Only Google Chrome and Safari support the playbackRate property.

    音频/视频的当前播放速度。例如:

    • 1.0:正常速度
    • 0.5:半速(更慢)
    • 2.0:倍速(更快)
    • -1.0:向后,正常速度
    • -0.5:向后,半速 注意:只有 Google Chrome 和 Safari 支持 playbackRate 属性。
  • set playbackRate(value): void
  • 参数

    • value: number

    返回 void

方法