CloudHub Docs
Download Documents

RTS


CloudHubRTS Electron

Server stream Mixing

configMixing

Configures mixing the server stream

configMixing(obj: object)
ParameterDescription
objConfiguration items:
destUrl: Destination Url
destVideoWidth: Width (pixels) of the destination video
destVideoHeight: Height (pixels) of the destination video
destVideoBandWidthKBPS: Bitrate of destination video(KBPS)
destVideoFramerate: Destination video frame rates(fps)
destBackgroundColor: background color of destination video. The default value is -1
destAudioBandWidthKBPS: Audio bitrate(KBPS)
destAudioChannels: Count of destination audio channels. The default value is 1
sourceStreamCount: The number of mixing source streams
sourceStreams: Mixed source streams
[url: The url of the source stream
x: Horizontal position (pixel) of the video frame relative to the top left corner
y: Vertical position (pixel) of the video frame relative to the top left corner
width: Width (pixel) of the video frame
height: Height (pixel) of the video frame
zOrder: Layer position of the video frame. The value ranges between 0 and 100.
fit: Video display mode
true:Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with grey.
false:Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.]
mixingExtraInfo: mixingExtraInfo

Note: destVideoWidth and destVideoHeight, both values = 0 at the same time, mean no video.These two values >0, but valid values in the range of [16-1920] indicate that there is a video; otherwise, the error will be returned.

Note:The format of destUrl must be followed: RTS Url addresses after server mixing

Note:The format of url must be followed:RTS Splicing the push URL

Returns

startMixing

Starts mixing the server stream

startMixing(obj: object)
ParameterDescription
objConfiguration items:
destUrl: Destination Url
destVideoWidth: Width (pixels) of the destination video
destVideoHeight: Height (pixels) of the destination video
destVideoBandWidthKBPS: Bitrate of destination video(KBPS)
destVideoFramerate: Destination video frame rates(fps)
destBackgroundColor: background color of destination video. The default value is -1
destAudioBandWidthKBPS: Audio bitrate(KBPS)
destAudioChannels: Count of destination audio channels. The default value is 1
sourceStreamCount: The number of mixing source streams
sourceStreams: Mixed source streams
[url: The url of the source stream
x: Horizontal position (pixel) of the video frame relative to the top left corner
y: Vertical position (pixel) of the video frame relative to the top left corner
width: Width (pixel) of the video frame
height: Height (pixel) of the video frame
zOrder: Layer position of the video frame. The value ranges between 0 and 100.
fit: Video display mode
true:Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with grey.
false:Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.]
mixingExtraInfo: mixingExtraInfo

Note: destVideoWidth and destVideoHeight, both values = 0 at the same time, mean no video.These two values >0, but valid values in the range of [16-1920] indicate that there is a video; otherwise, the error will be returned.

Note:The format of destUrl must be followed: RTS Url addresses after server mixing

Note:The format of url must be followed:RTS Splicing the push URL

Returns

destVideoBandWidthKBPS (Maximum bandwidth limit table for mixed-stream video)

Image resolutionFramerateMaximum bandwidth(kbps)remark
320*240fps <= 30256Image resolution <= 320*240
640*480fps <= 30768320*240 < Image resolution <= 640*480
1280*720fps <= 301536640*480 < Image resolution <= 1280*720
1920*1080fps <= 3020481280*720< Image resolution <= 1920*1080

stopMixing

Stops mixing the server stream

stopMixing()