# Video

#### new Video(id, name)

Description:
  - 视频Video构造函数。
Source:
  - stream/video.js, line 9

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | 设备Id
`name` | String | 设备名称

### Members

#### applyConstraints

Description:
  - 应用生效更新后的视频约束(分辨率、帧率等)
Source:
  - stream/video.js, line 211

应用生效更新后的视频约束(分辨率、帧率等)

#### applyConstraints

Description:
  - 应用生效更新后的视频约束(分辨率、帧率等)
Source:
  - stream/video.js, line 211

应用生效更新后的视频约束(分辨率、帧率等)

#### applyConstraintsWH

Description:
  - 视频打开时，分辨率即时更新生效，且通知给服务器
Source:
  - stream/video.js, line 224

视频打开时，分辨率即时更新生效，且通知给服务器

#### applyConstraintsWH

Description:
  - 视频打开时，分辨率即时更新生效，且通知给服务器
Source:
  - stream/video.js, line 224

视频打开时，分辨率即时更新生效，且通知给服务器

#### attachVideoElementMediaStream

Description:
  - 视频流渲染进视频控件
Source:
  - stream/video.js, line 1510

视频流渲染进视频控件

#### attachVideoElementMediaStream

Description:
  - 视频流渲染进视频控件
Source:
  - stream/video.js, line 1510

视频流渲染进视频控件

#### canUseVirtualBackground

Description:
  - 检查虚拟背景是否可用
Source:
  - stream/video.js, line 1567

检查虚拟背景是否可用

#### canUseVirtualBackground

Description:
  - 检查虚拟背景是否可用
Source:
  - stream/video.js, line 1567

检查虚拟背景是否可用

#### changePublishVideoQuality

Description:
  - 更改发布视频源端的视频质量
Source:
  - stream/video.js, line 1176

更改发布视频源端的视频质量

#### changePublishVideoQuality

Description:
  - 更改发布视频源端的视频质量
Source:
  - stream/video.js, line 1176

更改发布视频源端的视频质量

#### changeSubscribedVideoQuality

Description:
  - 更改订阅视频的视频质量
Source:
  - stream/video.js, line 1156

更改订阅视频的视频质量

#### changeSubscribedVideoQuality

Description:
  - 更改订阅视频的视频质量
Source:
  - stream/video.js, line 1156

更改订阅视频的视频质量

#### disableBeauty

Description:
  - 禁用美颜
Source:
  - stream/video.js, line 1664

禁用美颜

#### disableBeauty

Description:
  - 禁用美颜
Source:
  - stream/video.js, line 1664

禁用美颜

#### disableVirtualBackground

Description:
  - 禁用虚拟背景
Source:
  - stream/video.js, line 1605

禁用虚拟背景

#### disableVirtualBackground

Description:
  - 禁用虚拟背景
Source:
  - stream/video.js, line 1605

禁用虚拟背景

#### enableBeauty

Description:
  - 启用美颜
Source:
  - stream/video.js, line 1638

启用美颜

#### enableBeauty

Description:
  - 启用美颜
Source:
  - stream/video.js, line 1638

启用美颜

#### enableVirtualBackground

Description:
  - 启用虚拟背景
Source:
  - stream/video.js, line 1580

启用虚拟背景

#### enableVirtualBackground

Description:
  - 启用虚拟背景
Source:
  - stream/video.js, line 1580

启用虚拟背景

#### getBeautyConfig

Description:
  - 获取当前美颜配置
Source:
  - stream/video.js, line 1714

获取当前美颜配置

#### getBeautyConfig

Description:
  - 获取当前美颜配置
Source:
  - stream/video.js, line 1714

获取当前美颜配置

#### getBeautyFps

Description:
  - 获取美颜处理器的 FPS
Source:
  - stream/video.js, line 1695

获取美颜处理器的 FPS

#### getBeautyFps

Description:
  - 获取美颜处理器的 FPS
Source:
  - stream/video.js, line 1695

获取美颜处理器的 FPS

#### getNewStreamByTrack

Description:
  - 通过track生成新的MediaStream,虚拟背景启用时返回处理后的track
Source:
  - stream/video.js, line 72

通过track生成新的MediaStream,虚拟背景启用时返回处理后的track

#### getNewStreamByTrack

Description:
  - 通过track生成新的MediaStream,虚拟背景启用时返回处理后的track
Source:
  - stream/video.js, line 72

通过track生成新的MediaStream,虚拟背景启用时返回处理后的track

#### isBeautyEnabled

Description:
  - 检查美颜是否已启用
Source:
  - stream/video.js, line 1706

检查美颜是否已启用

#### isBeautyEnabled

Description:
  - 检查美颜是否已启用
Source:
  - stream/video.js, line 1706

检查美颜是否已启用

#### ismuteCamera

Description:
  - 获取禁视频状态
Source:
  - stream/video.js, line 1142

获取禁视频状态

#### ismuteCamera

Description:
  - 获取禁视频状态
Source:
  - stream/video.js, line 1142

获取禁视频状态

#### muteCamera

Description:
  - 禁视频
Source:
  - stream/video.js, line 1054

禁视频

#### muteCamera

Description:
  - 禁视频
Source:
  - stream/video.js, line 1054

禁视频

#### (async) preview

Description:
  - 预览摄像头。
Source:
  - stream/video.js, line 381

预览摄像头。

#### (async) preview

Description:
  - 预览摄像头。
Source:
  - stream/video.js, line 381

预览摄像头。

#### (async) previewAndPublish

Description:
  - 预览摄像头及发布流
Source:
  - stream/video.js, line 505

预览摄像头及发布流

#### (async) previewAndPublish

Description:
  - 预览摄像头及发布流
Source:
  - stream/video.js, line 505

预览摄像头及发布流

#### (async) publish

Description:
  - 发布视频流。
Source:
  - stream/video.js, line 458

发布视频流。

#### (async) publish

Description:
  - 发布视频流。
Source:
  - stream/video.js, line 458

发布视频流。

#### (async) sendVideoStreamControl

Description:
  - 发PDU消息给服务器,如可以实现1080P的码流达到10M
Source:
  - stream/video.js, line 328

发PDU消息给服务器,如可以实现1080P的码流达到10M

#### (async) sendVideoStreamControl

Description:
  - 发PDU消息给服务器,如可以实现1080P的码流达到10M
Source:
  - stream/video.js, line 328

发PDU消息给服务器,如可以实现1080P的码流达到10M

#### setAspectRatio

Description:
  - 设置分辨率宽高比
Source:
  - stream/video.js, line 197

设置分辨率宽高比

#### setAspectRatio

Description:
  - 设置分辨率宽高比
Source:
  - stream/video.js, line 197

设置分辨率宽高比

#### setBandwidth

Description:
  - 设置带宽
Source:
  - stream/video.js, line 247

设置带宽

#### setBandwidth

Description:
  - 设置带宽
Source:
  - stream/video.js, line 247

设置带宽

#### setBeautyConfig

Description:
  - 实时更新美颜参数（无需重新启用美颜）
Source:
  - stream/video.js, line 1725

实时更新美颜参数（无需重新启用美颜）

#### setBeautyConfig

Description:
  - 实时更新美颜参数（无需重新启用美颜）
Source:
  - stream/video.js, line 1725

实时更新美颜参数（无需重新启用美颜）

#### setDescription

Description:
  - 设置备注
Source:
  - stream/video.js, line 106

设置备注

#### setDescription

Description:
  - 设置备注
Source:
  - stream/video.js, line 106

设置备注

#### setFrameRate

Description:
  - 设置帧率
Source:
  - stream/video.js, line 181

设置帧率

#### setFrameRate

Description:
  - 设置帧率
Source:
  - stream/video.js, line 181

设置帧率

#### setLevel

Description:
  - 设置摄像头的优先级别
Source:
  - stream/video.js, line 93

设置摄像头的优先级别

#### setLevel

Description:
  - 设置摄像头的优先级别
Source:
  - stream/video.js, line 93

设置摄像头的优先级别

#### setMaxSpatialLayer

Description:
  - 视频多流时,设置最大空域层数
Source:
  - stream/video.js, line 1373

视频多流时,设置最大空域层数

#### setMaxSpatialLayer

Description:
  - 视频多流时,设置最大空域层数
Source:
  - stream/video.js, line 1373

视频多流时,设置最大空域层数

#### setResolution

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 138

设置分辨率

#### setResolution

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 138

设置分辨率

#### setResolutionWH

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 154

设置分辨率

#### setResolutionWH

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 154

设置分辨率

#### setSpatialLayerActive

Description:
  - 视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active
Source:
  - stream/video.js, line 1400

视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active

#### setSpatialLayerActive

Description:
  - 视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active
Source:
  - stream/video.js, line 1400

视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active

#### setStreamName

Description:
  - 设置导出时视频流名称
Source:
  - stream/video.js, line 117

设置导出时视频流名称

#### setStreamName

Description:
  - 设置导出时视频流名称
Source:
  - stream/video.js, line 117

设置导出时视频流名称

#### setStreamNickName

Description:
  - 设置导出时视频流昵称
Source:
  - stream/video.js, line 126

设置导出时视频流昵称

#### setStreamNickName

Description:
  - 设置导出时视频流昵称
Source:
  - stream/video.js, line 126

设置导出时视频流昵称

#### (async) subscrible

Description:
  - 订阅视频流
Source:
  - stream/video.js, line 952

订阅视频流

#### (async) subscrible

Description:
  - 订阅视频流
Source:
  - stream/video.js, line 952

订阅视频流

#### unmuteCamera

Description:
  - 取消禁视频
Source:
  - stream/video.js, line 1098

取消禁视频

#### unmuteCamera

Description:
  - 取消禁视频
Source:
  - stream/video.js, line 1098

取消禁视频

#### unpreview

Description:
  - 取消预览摄像头。
Source:
  - stream/video.js, line 433

取消预览摄像头。

#### unpreview

Description:
  - 取消预览摄像头。
Source:
  - stream/video.js, line 433

取消预览摄像头。

#### (async) unpublish

Description:
  - 取消发布视频流。
Source:
  - stream/video.js, line 847

取消发布视频流。

#### (async) unpublish

Description:
  - 取消发布视频流。
Source:
  - stream/video.js, line 847

取消发布视频流。

#### (async) unsubscrible

Description:
  - 取消订阅视频流。
Source:
  - stream/video.js, line 1007

取消订阅视频流。

#### (async) unsubscrible

Description:
  - 取消订阅视频流。
Source:
  - stream/video.js, line 1007

取消订阅视频流。

#### updateCameraData

Description:
  - 摄像头数据更改
Source:
  - stream/video.js, line 1336

摄像头数据更改

#### updateCameraData

Description:
  - 摄像头数据更改
Source:
  - stream/video.js, line 1336

摄像头数据更改

#### (async) updateExporterStreamName

Description:
  - 更新导出时视频流的名称及昵称
Source:
  - stream/video.js, line 1356

更新导出时视频流的名称及昵称

#### (async) updateExporterStreamName

Description:
  - 更新导出时视频流的名称及昵称
Source:
  - stream/video.js, line 1356

更新导出时视频流的名称及昵称

## Video

#### new Video(id, name)

Description:
  - 视频Video构造函数。
Source:
  - stream/video.js, line 9

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | 设备Id
`name` | String | 设备名称

### Members

#### applyConstraints

Description:
  - 应用生效更新后的视频约束(分辨率、帧率等)
Source:
  - stream/video.js, line 211

应用生效更新后的视频约束(分辨率、帧率等)

#### applyConstraints

Description:
  - 应用生效更新后的视频约束(分辨率、帧率等)
Source:
  - stream/video.js, line 211

应用生效更新后的视频约束(分辨率、帧率等)

#### applyConstraintsWH

Description:
  - 视频打开时，分辨率即时更新生效，且通知给服务器
Source:
  - stream/video.js, line 224

视频打开时，分辨率即时更新生效，且通知给服务器

#### applyConstraintsWH

Description:
  - 视频打开时，分辨率即时更新生效，且通知给服务器
Source:
  - stream/video.js, line 224

视频打开时，分辨率即时更新生效，且通知给服务器

#### attachVideoElementMediaStream

Description:
  - 视频流渲染进视频控件
Source:
  - stream/video.js, line 1510

视频流渲染进视频控件

#### attachVideoElementMediaStream

Description:
  - 视频流渲染进视频控件
Source:
  - stream/video.js, line 1510

视频流渲染进视频控件

#### canUseVirtualBackground

Description:
  - 检查虚拟背景是否可用
Source:
  - stream/video.js, line 1567

检查虚拟背景是否可用

#### canUseVirtualBackground

Description:
  - 检查虚拟背景是否可用
Source:
  - stream/video.js, line 1567

检查虚拟背景是否可用

#### changePublishVideoQuality

Description:
  - 更改发布视频源端的视频质量
Source:
  - stream/video.js, line 1176

更改发布视频源端的视频质量

#### changePublishVideoQuality

Description:
  - 更改发布视频源端的视频质量
Source:
  - stream/video.js, line 1176

更改发布视频源端的视频质量

#### changeSubscribedVideoQuality

Description:
  - 更改订阅视频的视频质量
Source:
  - stream/video.js, line 1156

更改订阅视频的视频质量

#### changeSubscribedVideoQuality

Description:
  - 更改订阅视频的视频质量
Source:
  - stream/video.js, line 1156

更改订阅视频的视频质量

#### disableBeauty

Description:
  - 禁用美颜
Source:
  - stream/video.js, line 1664

禁用美颜

#### disableBeauty

Description:
  - 禁用美颜
Source:
  - stream/video.js, line 1664

禁用美颜

#### disableVirtualBackground

Description:
  - 禁用虚拟背景
Source:
  - stream/video.js, line 1605

禁用虚拟背景

#### disableVirtualBackground

Description:
  - 禁用虚拟背景
Source:
  - stream/video.js, line 1605

禁用虚拟背景

#### enableBeauty

Description:
  - 启用美颜
Source:
  - stream/video.js, line 1638

启用美颜

#### enableBeauty

Description:
  - 启用美颜
Source:
  - stream/video.js, line 1638

启用美颜

#### enableVirtualBackground

Description:
  - 启用虚拟背景
Source:
  - stream/video.js, line 1580

启用虚拟背景

#### enableVirtualBackground

Description:
  - 启用虚拟背景
Source:
  - stream/video.js, line 1580

启用虚拟背景

#### getBeautyConfig

Description:
  - 获取当前美颜配置
Source:
  - stream/video.js, line 1714

获取当前美颜配置

#### getBeautyConfig

Description:
  - 获取当前美颜配置
Source:
  - stream/video.js, line 1714

获取当前美颜配置

#### getBeautyFps

Description:
  - 获取美颜处理器的 FPS
Source:
  - stream/video.js, line 1695

获取美颜处理器的 FPS

#### getBeautyFps

Description:
  - 获取美颜处理器的 FPS
Source:
  - stream/video.js, line 1695

获取美颜处理器的 FPS

#### getNewStreamByTrack

Description:
  - 通过track生成新的MediaStream,虚拟背景启用时返回处理后的track
Source:
  - stream/video.js, line 72

通过track生成新的MediaStream,虚拟背景启用时返回处理后的track

#### getNewStreamByTrack

Description:
  - 通过track生成新的MediaStream,虚拟背景启用时返回处理后的track
Source:
  - stream/video.js, line 72

通过track生成新的MediaStream,虚拟背景启用时返回处理后的track

#### isBeautyEnabled

Description:
  - 检查美颜是否已启用
Source:
  - stream/video.js, line 1706

检查美颜是否已启用

#### isBeautyEnabled

Description:
  - 检查美颜是否已启用
Source:
  - stream/video.js, line 1706

检查美颜是否已启用

#### ismuteCamera

Description:
  - 获取禁视频状态
Source:
  - stream/video.js, line 1142

获取禁视频状态

#### ismuteCamera

Description:
  - 获取禁视频状态
Source:
  - stream/video.js, line 1142

获取禁视频状态

#### muteCamera

Description:
  - 禁视频
Source:
  - stream/video.js, line 1054

禁视频

#### muteCamera

Description:
  - 禁视频
Source:
  - stream/video.js, line 1054

禁视频

#### (async) preview

Description:
  - 预览摄像头。
Source:
  - stream/video.js, line 381

预览摄像头。

#### (async) preview

Description:
  - 预览摄像头。
Source:
  - stream/video.js, line 381

预览摄像头。

#### (async) previewAndPublish

Description:
  - 预览摄像头及发布流
Source:
  - stream/video.js, line 505

预览摄像头及发布流

#### (async) previewAndPublish

Description:
  - 预览摄像头及发布流
Source:
  - stream/video.js, line 505

预览摄像头及发布流

#### (async) publish

Description:
  - 发布视频流。
Source:
  - stream/video.js, line 458

发布视频流。

#### (async) publish

Description:
  - 发布视频流。
Source:
  - stream/video.js, line 458

发布视频流。

#### (async) sendVideoStreamControl

Description:
  - 发PDU消息给服务器,如可以实现1080P的码流达到10M
Source:
  - stream/video.js, line 328

发PDU消息给服务器,如可以实现1080P的码流达到10M

#### (async) sendVideoStreamControl

Description:
  - 发PDU消息给服务器,如可以实现1080P的码流达到10M
Source:
  - stream/video.js, line 328

发PDU消息给服务器,如可以实现1080P的码流达到10M

#### setAspectRatio

Description:
  - 设置分辨率宽高比
Source:
  - stream/video.js, line 197

设置分辨率宽高比

#### setAspectRatio

Description:
  - 设置分辨率宽高比
Source:
  - stream/video.js, line 197

设置分辨率宽高比

#### setBandwidth

Description:
  - 设置带宽
Source:
  - stream/video.js, line 247

设置带宽

#### setBandwidth

Description:
  - 设置带宽
Source:
  - stream/video.js, line 247

设置带宽

#### setBeautyConfig

Description:
  - 实时更新美颜参数（无需重新启用美颜）
Source:
  - stream/video.js, line 1725

实时更新美颜参数（无需重新启用美颜）

#### setBeautyConfig

Description:
  - 实时更新美颜参数（无需重新启用美颜）
Source:
  - stream/video.js, line 1725

实时更新美颜参数（无需重新启用美颜）

#### setDescription

Description:
  - 设置备注
Source:
  - stream/video.js, line 106

设置备注

#### setDescription

Description:
  - 设置备注
Source:
  - stream/video.js, line 106

设置备注

#### setFrameRate

Description:
  - 设置帧率
Source:
  - stream/video.js, line 181

设置帧率

#### setFrameRate

Description:
  - 设置帧率
Source:
  - stream/video.js, line 181

设置帧率

#### setLevel

Description:
  - 设置摄像头的优先级别
Source:
  - stream/video.js, line 93

设置摄像头的优先级别

#### setLevel

Description:
  - 设置摄像头的优先级别
Source:
  - stream/video.js, line 93

设置摄像头的优先级别

#### setMaxSpatialLayer

Description:
  - 视频多流时,设置最大空域层数
Source:
  - stream/video.js, line 1373

视频多流时,设置最大空域层数

#### setMaxSpatialLayer

Description:
  - 视频多流时,设置最大空域层数
Source:
  - stream/video.js, line 1373

视频多流时,设置最大空域层数

#### setResolution

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 138

设置分辨率

#### setResolution

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 138

设置分辨率

#### setResolutionWH

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 154

设置分辨率

#### setResolutionWH

Description:
  - 设置分辨率
Source:
  - stream/video.js, line 154

设置分辨率

#### setSpatialLayerActive

Description:
  - 视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active
Source:
  - stream/video.js, line 1400

视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active

#### setSpatialLayerActive

Description:
  - 视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active
Source:
  - stream/video.js, line 1400

视频多流时,设置空域每层开启的状态。状态值定义： 0-维持原状, 1-unactive, 2-active

#### setStreamName

Description:
  - 设置导出时视频流名称
Source:
  - stream/video.js, line 117

设置导出时视频流名称

#### setStreamName

Description:
  - 设置导出时视频流名称
Source:
  - stream/video.js, line 117

设置导出时视频流名称

#### setStreamNickName

Description:
  - 设置导出时视频流昵称
Source:
  - stream/video.js, line 126

设置导出时视频流昵称

#### setStreamNickName

Description:
  - 设置导出时视频流昵称
Source:
  - stream/video.js, line 126

设置导出时视频流昵称

#### (async) subscrible

Description:
  - 订阅视频流
Source:
  - stream/video.js, line 952

订阅视频流

#### (async) subscrible

Description:
  - 订阅视频流
Source:
  - stream/video.js, line 952

订阅视频流

#### unmuteCamera

Description:
  - 取消禁视频
Source:
  - stream/video.js, line 1098

取消禁视频

#### unmuteCamera

Description:
  - 取消禁视频
Source:
  - stream/video.js, line 1098

取消禁视频

#### unpreview

Description:
  - 取消预览摄像头。
Source:
  - stream/video.js, line 433

取消预览摄像头。

#### unpreview

Description:
  - 取消预览摄像头。
Source:
  - stream/video.js, line 433

取消预览摄像头。

#### (async) unpublish

Description:
  - 取消发布视频流。
Source:
  - stream/video.js, line 847

取消发布视频流。

#### (async) unpublish

Description:
  - 取消发布视频流。
Source:
  - stream/video.js, line 847

取消发布视频流。

#### (async) unsubscrible

Description:
  - 取消订阅视频流。
Source:
  - stream/video.js, line 1007

取消订阅视频流。

#### (async) unsubscrible

Description:
  - 取消订阅视频流。
Source:
  - stream/video.js, line 1007

取消订阅视频流。

#### updateCameraData

Description:
  - 摄像头数据更改
Source:
  - stream/video.js, line 1336

摄像头数据更改

#### updateCameraData

Description:
  - 摄像头数据更改
Source:
  - stream/video.js, line 1336

摄像头数据更改

#### (async) updateExporterStreamName

Description:
  - 更新导出时视频流的名称及昵称
Source:
  - stream/video.js, line 1356

更新导出时视频流的名称及昵称

#### (async) updateExporterStreamName

Description:
  - 更新导出时视频流的名称及昵称
Source:
  - stream/video.js, line 1356

更新导出时视频流的名称及昵称