Type Definitions
failCallback(errorCode)
失败回调
Parameters:
Name | Type | Description |
---|---|---|
errorCode |
number
|
错误码,请参考ChuangLiveEngine.ChuangErrorCode |
CCStreamRevoke
流取消授权信息
Properties:
Name | Type | Description |
---|---|---|
streamId |
string
|
流ID |
reason |
string
|
何种权限被吊销,可能是以下这些值中的一个。'camera', 'microphone', 'screen' |
Type:
-
Object
CCStreamNetstat
流信息
Properties:
Name | Type | Description |
---|---|---|
streamId |
string
|
流ID |
loss |
float
|
当前丢包率 |
realframerate |
number
|
实际接受帧率 |
framerate |
number
|
设置帧率 |
Type:
-
Object
ChuangStreamInfo
SDK用户流信息
Properties:
Name | Type | Description |
---|---|---|
streamId |
string
|
流ID |
width |
number
|
此流的宽度,单位像素 |
height |
number
|
此流的高度,单位像素 |
uid |
string
|
流所属uid |
streamstat |
string
|
流模式(纯音频/纯视频/音视频) |
streamtype |
string
|
流类型 (RTC流/混流) |
Type:
-
Object
DomPlayerOptions
播放器默认属性
Properties:
Name | Type | Description |
---|---|---|
fit |
"cover"
|
"contain"
|
默认cover |
muted |
boolean
|
默认false |
autoplay |
boolean
|
默认true |
Type:
-
Object
ChuangVideoCanvas
预览播流等容器配置
Properties:
Name | Type | Description |
---|---|---|
domId |
string
|
容器id值 |
options |
DomPlayerOptions
|
Type:
-
Object
ChuangMixStreamConfig
混流配置
Properties:
Name | Type | Description |
---|---|---|
rtmpAddress |
string
|
混流后输出的rtmp 完整地址:(一般是混流后输出的 rtmp 服务器地址 + 混流后输出的 rtmp 服务器端口号 + 混流后输出的 rtmp 应用名) |
outputVideoResolution |
ChuangLiveEngine.MIX_RESOLUTIONS
|
混流后的视频分辨率 支持的分辨率 |
outputStremId |
string
|
混流后的流Id |
outputVideoBitrate |
string
|
混流后的视频比特率(单位:kbps) |
mixStreams |
Array.<ChuangMixStreamInfo>
|
参与混流的流信息列表 |
Type:
-
Object
ChuangVideoConfig
推流视频配置
Properties:
Name | Type | Description |
---|---|---|
captureWidth |
number
|
流的获取宽度 |
captureHeight |
number
|
流的获取高度 |
encodeWidth |
number
|
流的编码宽度 |
encodeHeight |
number
|
流的编码高度 |
fps |
number
|
推流的视频帧率 |
bitrateKbps |
number
|
推流的视频比特率 |
renderMode |
object
|
推流预览的填充模式 |
videoDeviceId |
string
|
视频设备ID |
Type:
-
Object
ChuangAudioConfig
推流音频配置
Properties:
Name | Type | Description |
---|---|---|
audioDeviceId |
string
|
音频设备ID |
Type:
-
Object
ChuangMixStreamInfo
参与混流的流信息列表
Properties:
Name | Type | Description |
---|---|---|
streamId |
string
|
用户所推的原视频流的流Id |
mixZIndex |
string
|
用户所推的视频流,混入之后期望的层叠顺序(0为最底层,一般发起混流的主播传0,之后依次向上层叠) |
mixSrcRect |
ChuangRect
|
用户所推的原视频流需要混入的部分的坐标信息 |
mixDstRect |
DSTRect
|
用户所推的视频流,混入之后期望所在的位置和大小的坐标信息 |
videoWidth |
string
|
用户所推的流的视频宽度 |
videoHeight |
string
|
用户所推的流的视频高度 |
mixv |
string
|
混流视频是否有视频 |
Type:
-
Object
DSTRect
混流图像输出区域坐标
Properties:
Name | Type | Description |
---|---|---|
left |
string
|
图像左上角横坐标值 |
top |
string
|
图像左上角纵坐标值 |
right |
string
|
图像右下角横坐标值 |
bottom |
string
|
图像右上角纵坐标值 |
Type:
-
Object
ChuangStreamQuality
流质量
Properties:
Name | Type | Description |
---|---|---|
videoFps |
number
|
视频帧率 |
videoBitrateKbps |
number
|
视频码率 |
audioBitrateKbps |
number
|
音频码率 |
packetLostRate |
number
|
丢包率 |
rtt |
number
|
网络延迟 |
uploadSpeed |
number
|
上行速度 |
downloadSpeed |
number
|
下行速度 |
uploadBytes |
number
|
上行字节数 |
downloadBytes |
number
|
下行字节数 |
Type:
-
Object
ChuangStreamStatus
流质量
Properties:
Name | Type | Description |
---|---|---|
url |
string
|
流地址 |
width |
number
|
宽度 |
height |
number
|
高度 |
msg |
string
|
丢包率 |
time |
number
|
时间 |
Type:
-
Object