Class: StreamExporterServer

StreamExporterServer


new StreamExporterServer()

StreamExporterServer构造函数。

Example
var streamExporterServer = new StreamExporterServer();

Methods


addSubVideo(userId, deviceId, x, y, width, height, zorder, alpha, scalingType)

新增视频对象的位置布局且发布

Parameters:
Name Type Description
userId Object
deviceId Object
x Object
y Object
width Object
height Object
zorder Object
alpha Object
scalingType Object

addVideoItem(userId, deviceId, x, y, width, height, zorder, alpha, scalingType)

添加视频对象的位置布局

Parameters:
Name Type Description
userId Object
deviceId Object

摄像头Id,唯一标示一路共享的摄像头视频。

x Object

此视频在左上角左边位置(上边位置),即x坐标,取值0.0~1.0,内部取值为:width X,height Y

y Object
width Object

此视频宽度(高度)比例,取值0.0~1.0,内部取值为:width W,height H

height Object
zorder Object

多个视频覆盖时,前后位置,zorder越小,视频越在下层,会被覆盖;取值0-10

alpha Object

透明度(暂不使用)

scalingType Object

视频渲染到混流视频上的渲染模式(暂不使用)


modSubVideo(userId, deviceId, x, y, width, height, zorder, alpha, scalingType)

更新视频对象的位置布局且发布

Parameters:
Name Type Description
userId Object
deviceId Object
x Object
y Object
width Object
height Object
zorder Object
alpha Object
scalingType Object

pauseResume()

流导出的暂停及恢复


removeAllVideoItem()

清除所有的视频对象的位置布局


rmvSubVideo(userId, deviceId)

删除视频对象且发布

Parameters:
Name Type Description
userId Object
deviceId Object

selectMixedVideos4Exporter()

多路视频混屏导出


selectSingleVideo4Exporter(userId, deviceId, audioUserId)

指定单路视频导出

Parameters:
Name Type Description
userId Object
deviceId Object
audioUserId Object

setAudioUserId(audioUserId)

设置导出的音频流的用户ID

Parameters:
Name Type Description
audioUserId Object

setAutoLayout(viewLayoutMode)

设置导出视频流的混屏布局(服务器决定还是手动)

Parameters:
Name Type Description
viewLayoutMode Object

stopExporter()

停止当前的流导出


updataVideo(oldDeviceId, userId, deviceId)

更新视频对象,位置布局不动,且发布

Parameters:
Name Type Description
oldDeviceId Object
userId Object
deviceId Object

updateStreamsExporter(exporterType, id, name, viewWidth, viewHeight, outBitrate, outFps, maxVideoNumber)

更新服务的参数

Parameters:
Name Type Description
exporterType Object
id Object
name Object
viewWidth Object
viewHeight Object
outBitrate Object
outFps Object
maxVideoNumber Object