CloudHub Docs
Download Documents

RTS


CloudHubRTS Electron

Equipment management

The get Device Manager() method needs to be called in advance in the push-pull stream to obtain the device management object

getVideoDevices

Get the camera list

getVideoDevices()

return

devicename: Camera name, deviceid: Camera Id array contains objects

getCurrentVideoDevice

Get the current camera

getCurrentVideoDevice()

return devicename:Camera name, deviceid:Camera Id

setVideoDevice

Set up the camera

setVideoDevice(deviceId: string)
ParametersDescription
deviceIdCamera id

getAudioPlaybackDevices

Get the list of speakers

getAudioPlaybackDevices()

setAudioPlaybackDevice

Play local video

setAudioPlaybackDevice(deviceId: string)
ParametersDescription
deviceIdSpeaker id

getPlaybackDeviceInfo

Obtain playback device information (speaker)

getPlaybackDeviceInfo()

getCurrentAudioPlaybackDevice

Get the current speaker

getCurrentAudioPlaybackDevice()

setAudioPlaybackVolume

Set the volume of audio and video playback equipment

setAudioPlaybackVolume(volume: number)
ParametersDescription
viewvolume0-255

getAudioPlaybackVolume

Get the volume of the audio playback device

getAudioPlaybackVolume()

return Volume value: 0-255

getAudioRecordingDevices

Get the microphone list

getAudioRecordingDevices()

setAudioRecordingDevice

Set up the microphone

setAudioRecordingDevice(deviceId: string)
ParametersDescription
deviceIdDevice Id

getRecordingDeviceInfo

Get recording device information (microphone)

getRecordingDeviceInfo()

getCurrentAudioRecordingDevice

Get the current microphone

getCurrentAudioRecordingDevice()

getAudioRecordingVolume

Get the volume of the recording device

getAudioRecordingVolume()

setAudioRecordingVolume

Set the volume of the recording device

setAudioRecordingVolume(volume: number) 
ParametersDescription
volume0-255

startAudioPlaybackDeviceTest

Test speaker

startAudioPlaybackDeviceTest(deviceId: string, filepath: string, options: any = { loop: true })
ParametersDescription
deviceIdThe id of the speaker to be detected
filepathThe played audio file requires an absolute path
optionsConfiguration item loop Whether to play in a loop

stopAudioPlaybackDeviceTest

Stop testing speakers

stopAudioPlaybackDeviceTest()

startAudioRecordingDeviceTest

Start testing the microphone

startAudioRecordingDeviceTest(deviceId: string, interval = 200)
ParametersDescription
deviceIddevice id
intervalReturn volume interval

stopAudioRecordingDeviceTest

Stop testing the microphone

stopAudioRecordingDeviceTest()

getAudioPlaybackDeviceMute

Get the mute status of the audio playback device

getAudioPlaybackDeviceMute()

return

setAudioPlaybackDeviceMute

Mute unmute audio playback device

setAudioPlaybackDeviceMute(mute: boolean)

getAudioRecordingDeviceMute

Get the mute status of the recording device

getAudioRecordingDeviceMute(): boolean

setAudioRecordingDeviceMute

Mute unmute recording equipment

setAudioRecordingDeviceMute(mute: boolean)