Global

Type Definitions

ChuangAudioConfig

音频配置信息
Type:
  • object
Properties:
Name Type Description
profileId int 音频级别
szAudioDev: string 麦克风名称
useLoopBack: int 是否采集loopback
Source:

ChuangCustomAudioCaptureConfig

视频配置信息
Type:
  • object
Properties:
Name Type Description
sampleRate: int 采样率
channel: int 声道数
Source:

ChuangCustomAudioRenderConfig

音频配置
Type:
  • object
Properties:
Name Type Description
sampleRate: int 采样率
channel: int 声道数
Source:

ChuangCustomVideoRenderConfig

视频配置
Type:
  • object
Properties:
Name Type Description
type: ChuangVideoBufferType 视频数据格式类型
format: ChuangVideoPixelType 视频像素存储类型
enableEngineRender: bool 是否SDK渲染
Source:

ChuangMixStreamConfig

混流信息
Type:
  • object
Properties:
Name Type Description
target string rtmp完整推流地址
width: int 流宽
height: int 流高
videoBitrateKbps int 码率
backgroundImage string 混流背景图id
noticeStream bool 是否将该混流通知给房间内其他用户
nInputStreamCount: int 混流总数
watermark ChuangMixStreamWatermark 混流水印信息
mixStreams: ChuangMixStreamInfo 混流流信息(数组)
Source:

ChuangMixStreamInfo

混流单个流的信息
Type:
  • object
Properties:
Name Type Description
streamId string 流ID
width: int 流宽
height: int 流高
zlevel int 流所处层
mixVideo bool 是否混当前流
srcRect.left int 视频源 左
srcRect.top int 视频源 上
srcRect.right int 视频源 右
srcRect.bottom int 视频源 下
dstRect.left int 视频显示 左
dstRect.top int 视频显示 上
dstRect.right int 视频显示 右
dstRect.bottom int 视频显示 下
renderMode ChuangVideoRenderMode 填充模式
rotation ChuangStreamRotation 流方向类型
Source:

ChuangMixStreamWatermark

混流水印信息
Type:
  • object
Properties:
Name Type Description
image: string 水印图片id
left: int 混流画布中水印左上角x坐标
top: int 混流画布中水印左上角y坐标
right int 混流画布中水印右下角x坐标
bottom int 混流画布中水印右下角y坐标
Source:

ChuangNetworkSpeedTestConfig

网络测速配置
Type:
  • object
Properties:
Name Type Description
testUpLink bool 是否测试上行连接
expectedUpLinkBitrateKbps: int 上行连接测速码率,单位Kbps (10Kbps~10000Kbps)
testDownLink: bool 是否测试下行连接
exceptedDownLinkBitrateKbps int 下行连接测速码率,单位Kbps (10Kbps~10000Kbps)
Source:

ChuangPublishChannel

推流通道
Type:
  • object
Properties:
Name Type Description
MAIN int 0 主通道
AUX int 1 副通道
Source:

ChuangStreamConfig

视频配置信息
Type:
  • object
Properties:
Name Type Description
streamID: string 推流流名
rtmpAddress: string rtmp完整推流地址
streamMode int 推流类型
Source:

ChuangStreamRotation

流方向类型
Type:
  • object
Properties:
Name Type Description
ROTATION_0 int 0 无旋转
ROTATION_90 int 1 顺时针旋转90度
ROTATION_180 int 2 顺时针旋转180度
ROTATION_270 int 3 顺时针旋转270度
Source:

ChuangUserRole

用户身份类型
Type:
  • object
Properties:
Name Type Description
Auchor int 1 主播
Audience int 2 观众
Interaction int 3 互动
Source:

ChuangVideoBufferType

视频自采集数据类型
Type:
  • object
Properties:
Name Type Description
UNKNOWN_DATA int 0 未知类型
RAW_DATA int 1 裸数据
ENCODED_DATA int 2 编码后264数据
Source:

ChuangVideoCanvas

绘制窗口信息
Type:
  • object
Properties:
Name Type Description
canvas: HTMLElement canvas
renderMode: int 填充模式
mirrorMode: int 镜像
Source:

ChuangVideoConfig

视频配置信息
Type:
  • object
Properties:
Name Type Description
captureWidth int 采集宽
captureHeight int 采集高
encodeWidth int 推流编码宽
encodeHeight int 推流编码高
fps int 帧率
bitrateKbps int 码率
renderMode int 采集数据宽高与推流数据宽高不等时的裁剪模式
szCameraName: string 摄像头名称
Source:

ChuangVideoEncodedFrameParam

视频帧参数
Type:
  • object
Properties:
Name Type Description
isKeyFrame: bool 是否关键帧
width: int
height: int
rotation: ChuangStreamRotation 旋转角度
Source:

ChuangVideoFrameParam

视频帧参数
Type:
  • object
Properties:
Name Type Description
type: ChuangVideoPixelType 视频像素存储类型
width: int
height: int
rotation: ChuangStreamRotation 旋转角度
Source:

eventtype

事件
Type:
  • object
Properties:
Name Type Description
'onRoomStateUpdate' string 房间状态变化通知 返回(roomId, state, errorCode)
'onRoomStreamUpdate' string 房间流状态变化通知 返回(roomId, type, streams)
'onPublishStreamStateUpdate' string 推流状态变化通知 返回(streamId, state, errorCode)
'onPublishStreamVideoSizeChanged' string 推流宽高变化通知 返回(streamId, width, height)
'onPublishStreamQualityUpdate' string 推流质量回调 返回(Infos)
'onCaptureSoundLevelUpdate' string 采集音量大小回调 返回(Infos, nStreamCount)
'onPlayStreamQualityUpdate' string 播流质量通知 返回(streamId, Infos)
'onPlayStreamStateUpdate' string 播流状态回调 返回(streamId, state, errorCode)
'onRemoteSoundLevelUpdate' string 播流音量大小回调 返回(Infos, nStreamCount)
'onPlayStreamEvent' string 播流回调通知 返回(streamId, event)
'onPlayStreamFirstAudio' string 播流收到第一帧音频回调 返回(streamId)
'onPlayStreamFirstVideo' string 播流收到第一帧视频回调 返回(streamId)
'onPlayStreamStateChanged' string 播流状态改变通知 返回(streamId, state)
'onPlayStreamVideoSizeChanged' string 播流宽高改变通知 返回(streamId, width, height)
'onPlayStreamVideoRotationChanged' string 播流视频方向旋转改变通知 返回(streamId, rotation)
'onReceiveStreamAttchedMessage' string 收到推流附加消息 返回(streamId, msg, messageLen, timestampOffset)
'onNetworkSpeedTestQualityUpdate' string 网络测速回调 返回(Infos, type)
'onNetworkTypeChanged' string 网络状态变化回调 返回(type)
'onFirstLocalAudioFramePublished' string 发送本地首帧音频回调 返回(streamId)
'onFirstLocalVideoFramePublished' string 发送本地首帧视频回调 返回(streamId)
'onPlayStreamFirstAudioDecoded' string 当前流解码第一帧音频回调 返回(streamId, elapsed)
'onAudioRouteChange' string 音频路由变化回调 返回(result)
'onStart' string 通知将要开始采集视频帧,收到该回调后向 SDK 发送的视频帧数据才有效 返回(channel)
'onStop' string SDK 通知将要停止采集视频帧 返回(channel)
'onEncodedDataTrafficControl' string SDK 检测到网络变化,通知开发者需要做流量控制 返回(Infos, channel)
'onVideoNeedKeyFrame' string 在外部采集为编码后的264数据时,SDK 检测到网络变化,通知开发者需要强制编码关键帧 返回(channel)
'onRemoteVideoFrameRawData' string 远端流外部渲染二进制数据回调 返回(streamId, data, dataLength, Infos)
'onRemoteVideoFrameEncodedData' string 远端流外部渲染H264回调 返回(streamId, data, dataLength, Infos, referenceTimeMillisecond)
'onLocalVideoFrameRawData' string 本地流外部渲染二进制数据回调 返回(channel, data, dataLength, Infos)
'onMixStreamResult' string 混流结果回调 返回(errorCode)
'onAudioMixingCopyData' string 在外部采集为编码后的264数据时,SDK 检测到网络变化,通知开发者需要强制编码关键帧 返回(channel, Infos)
Source: