Home > @bilibili-live/web-player-video > Video
# Video class
Signature:
export declare class Video
# Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(src, opts) | Constructs a new instance of the Video class |
# Properties
Property | Modifiers | Type | Description |
---|---|---|---|
emit | (type: EventType, ...args: any[]) => void | ||
on | (type: EventType, handler: Function) => () => void | ||
once | (type: EventType, handler: Function) => () => void | ||
status | VideoStatus |
# Methods
Method | Modifiers | Description |
---|---|---|
capturePic(imgType, quality) | 捕获当前的画面,返回 DataURL | |
delyLoad() | 终止自动load,调用方控制load时机(必须调用) | |
destroy(holdLastFrame) | 销毁Video实例,与Player.destroy保持一致 | |
getSrc() | ||
getVideoEl() | ||
getVideoInfo() | ||
load() | 加载流,即将开始播放视频 | |
mute(v) | 视频静音 | |
pause() | ||
play() | ||
removeVideoEl() | ||
seek({ forward, keepBuffer }) | 支持两种方式向前跳,单位s 如果不能满足期望(剩余buffer 5s,期望forward 6s),则忽略本次操作 优先使用keepBuffer | |
volume(v) | 设置视频音量 |