CloudHubRTS Electron
- 概览
- RtsEngine
- RtsUpStream
- RtsUpStreamEventHandler
- RtsDownStream
- RtsDownStreamEventHandler
- RtsMixingUpstream
- RtsMixingUpstreamEventHandler
- RtsServerStreamMixing
- RtsServerStreamMixingEventHandler
- RtsDevicesManager
- 更新日志
拉流音视频相关
getVersion
获取版本
getVersion(): string
getClientId
获取获取用户id
getClientId(): string
startPull
开始拉流
startPull(urlPull: string)
参数 | 说明 |
---|---|
urlPull | 要拉流的地址, 拉流地址生成规则详见RTS协议推拉流 |
stopPull
停止拉流
stopPull()
isPulling
是否正在拉流
isPulling(): boolean
返回
- true 是
- false 否
pauseAudio
暂停播放音频
pauseAudio()
返回
- 0 成功
- 非0 失败
resumeAudio
恢复播放音频
resumeAudio()
返回
- 0 成功
- 非0 失败
pauseVideo
停止播放视频
pauseVideo()
返回
- 0 成功
- 非0 失败
resumeVideo
恢复播放视频
resumeVideo()
返回
- 0 成功
- 非0 失败
enableVolumeIndication
启用用户音量提示
enableVolumeIndication(interval: number)
参数 | 说明 |
---|---|
interval | 指定音量提示的时间间隔: <=0 : 禁用音量提示功能。 >0 :返回音量提示的间隔,单位为毫秒 |
返回
- 0 成功
- 非0 失败
getUrl
获取url地址
getUrl()
setupRemoteVideo
播放远端视频
setupRemoteVideo(view: Element)
参数 | 说明 |
---|---|
view | 播放视频窗口元素 |
removeRemoteVideo
停止播放远端视频
removeRemoteVideo()
getSourceId
获取拉流ID
getSourceId()
setStreamConfigs
设置流配置项
setStreamConfigs(option: object)
参数 | 描述 |
---|---|
option | 可选, 有以下值: delay_time_ms: type: number, 指定播放延迟,毫秒级,默认500,注意:取值范围(100以上) |
getDeviceManager
获取设备管理对象
getDeviceManager()
返回
- 返回对象格式,里面包含了设备管理的相关方法