CloudHub Docs
Download Documents

RTS


CloudHubRTS Electron

RtsMixingUpStream

getClientId

Gets a ClientID

getClientId(): string

startPush

Start pushing

startPush(urlPush: string)
ParameterDescription
urlPushThe address of the push stream. The character must be no longer than 1024 bytes. Url does not support special characters such as Chinese characters

stopPush

Stop pushing

stopPush()

isPushing

Gets the state of the push stream

isPushing(): boolean

Returns

getUrl

Gets the URL

getUrl():string

Returns

configMixing

Configures the mixing

configMixing(obj: object)
ParameterDescription
objConfiguration items:
destVideoWidth: Width (pixels) of the destination video
destVideoHeight: Height (pixels) of the destination video
destVideoFramerate: Destination video frame rates(fps)
destBackgroundColor: background color of destination video. The default value is -1
destAudioChannels: Count of destination audio channels. The default value is 1
sourceStreamCount: The number of mixing source streams
sourceStreams: Mixed source streams
[streamId: The streamID of the IUpStream can be obtained through RtsUpStream::getStreamID
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.

Returns

setupLocalVideo

Play a local mixing video

setupLocalVideo(view: Element)
ParameterDescription
viewPlay a local mixing video element

removeLocalVideo

Stop playing the local mixing video

removeLocalVideo()