CloudHub JSSDK
- Overview
- CloudHubRTC
- CloudHubRTCObject
- Client
- ClientEvent
- ClientLiveTranscoding
- ClientChannelMediaRelayConfig
- Stream
- StreamEvent
- DeviceManager
- Constants
The description and interface of Stream
- The methods provided by the Stream interface are used to define the behavior of the audio and video stream objects.
- You can createStream objects with create Stream. A Stream object refers to a local audio and video stream published during a call or a subscribed remote audio and video stream.
- The Stream method can be invoked for both local and remote audio and video streams without special instructions.
Base
init
What it does: Initialized audio video object. This method initializes the locally created audio and video stream object.
init(options?:object, onCallback?: function): void
// example:
stream.init({}, function(errinfos) {
if(errinfos){
console.error(‘stream init errinfos:’, errinfos);
// handle err
}
console.log("local stream initialized");
// publish the stream
//……
});
name | type | description |
---|---|---|
onCallback | function | Callback function, which takes an errinfos parameter with a type of array | undefined,If errinfos is undefined, init has not failed. If errinfos is array, init has failed. |
Note:
- When the type of stream is video, the following may occur:
- The audio is normal, the video is normal (errinfos is undefined)
- The audio is normal, the video is failed (errinfos is array, carry video_device Error message)
- The audio is failed, the video is normal (errinfos is array, carry audio_device Error message)
- The audio is failed, the video is failed (errinfos is array, carry video_device 和 audio_device Error message)
- If init fails, the callback parameter error information errinfos type is array, In the error message, type contains video_device(Video equipment)、audio_device(Video equipment)、screen(Screen / program sharing)。 eg:
[
{
type: "video_device",
errflag: "NOT_ALLOWED_ERROR",
message: "Permission denied"
}, {
type: "audio_deivce",
errflag: "NOT_ALLOWED_ERROR",
message: "Permission denied"
}
]
or
[
{
type: "screen",
errflag: "NOT_SUPPORT",
message: "not support not plugin screen shareing"
}
]
errflag The following values may appear in the field
- “NOT_SUPPORT”: The browser is not supported.
- “INVALID_ARG”: Invalid parameter.
- “NOT_ALLOWED_ERROR”: The user refuses to grant permission to the corresponding camera or microphone.
- “NOT_READABL_EERROR”: The camera or microphone is occupied.
- “ABORT_ERROR”: Device abort error.
- “NOT_FOUND_ERROR”: The camera or microphone is occupied.
- “OVER_CONSTRAINED_ERROR”: The configured constraint cannot meet the requirements.
- “SECURITY_ERROR”: Security error, webpage use of device media is prohibited. Whether this mechanism is turned on or off depends on the preferences of individual users.
- “TYPE_ERROR”: Device constraints are set to false.
- “REQ_TIMEOUT”: Requested device/screen sharing timed out.
- “SCREEN_FAIL”: Screen/program flow acquisition failed.
- “UNDEFINED_ERROR”: Undefined error.
Note:
- See Browser getUserMedia interface error type
- See “Constant declaration and supplementary notes” The error type of the browser’s getUserMedia interface failure.
- Chrome 72 and later versions support screen sharing, if necessary, please install the latest version of the Chrome browser.
- Screen/application sharing is only supported on PC, not mobile.
on
What it does: Event binding. Currently supported incidents and events for events, please see “Stream Event documentation”
on(eventType: string, listener: function): void
// example:
stream.on('camera-access-allowed', function (evt) {
// This callback notifies the App that the permission to use the local camera has been obtained.
console.log(''camera-access-allowed'', evt);
})
name | type | description |
---|---|---|
eventType | string | Event name to be bound |
listener | function | Event listener to be bound |
off
What it does: Cancel the event binding. This method is used to remove events bound by Stream.on().
off(eventType: string, listener?: function): void
name | type | description |
---|---|---|
eventType | string | Event name to be removed |
listener | function | Event listener to be removed. |
offAll
What it does: Cancel all event bindings under the specified type.
offAll(eventType: string): void
// example:
stream.offAll("videoplayer-status-change");
Audio
hasAudio
What it does: Get audio flag. The method obtains the video track in the audio and video stream and can be used with replaceTrack.
hasAudio(): boolean
Returns: boolean
true: The audio and video stream object contains audio resources. false: The audio resource is not included in the audio and video stream object.
getAudioTrack
What it does: Get the audio track. This method gets the audio tracks in the audio and video streams and can be used with replace Track.
getAudioTrack(): MediaStreamTrack | void
Returns: MediaStreamTrack | void
If the audio and video stream contains an audio track, it will be returned as a MediaStreamTrack object.
playAudio
What it does: Play the audio stream. This method plays audio stream
playAudio(options?: object, onCallback?: function): void
// example:
stream.playAudio({}, function(StreamPlayError){
console.error(‘playAudio StreamPlayError’, StreamPlayError);
// Playing failed, typically blocked for browser strategies. Guide users to trigger recovery playback with gestures.
});
name | type | description |
---|---|---|
options | object | The options for streaming playback are configured as follows: 1. muted?: boolean: Set whether the playing stream is muted, the default is false. Muted is usually used to circumvent the browser’s autoplay strategy. In general, when playing audio / video with sound, the browser will ask the line to be triggered by a gesture. If you do not want to trigger with a gesture, you can also choose to set muted to true, so that you can bypass the autoplay policy. See Auto-play strategy for handling browsers。 2. volume?: number: Set the volume size of the playback, the value range is [0,100], default is 100。 |
onCallback | function | Whether the playback is successful or not. The callback parameter carries StreamPlayError.If the playback is successful, the parameter is null/undefined. If the playback fails, you can use StreamPlayError to understand the possible causes. StreamPlayError: See CloudHubRTC Data object document Description of StreamPlayError. |
Note: Affected by browser policy, on Chrome 70+ and Safari browsers, this method must be triggered by user gestures, see Auto-play strategy for handling browsers 。
unplayAudio
What it does: Stop the audio stream. Call this method to stop playing “Stream.playAudio”.
unplayAudio(): void
resumeAudio
What it does: Resume audio stream playback.
This method is usually called when playback fails after calling Stream.playAudio. Usually the playback failure is caused by browser policy blocking. This method needs to be triggered by gestures. See “Auto-play strategy for handling browsers”。
resumeAudio(): Promise<any>
Returns Promise
muteAudio
What it does: Disable audio tracks. This method disables the audio track. For a local stream, calling this method stops sending audio, and the remote end triggers a Client.on(“mute-audio”) callback. For remote streams, calling this method does not receive audio and stops playing audio.
muteAudio(): boolean
Note: For local streams, this method can only be used if audio is set to true when createStream.
Returns: boolean
true: Disabled audio track success. false: Disabled audio track fail, there may be no audio, unproduction, and audio tracks have been disabled.
unmuteAudio
What it does: Enable the audio track. This method enables audio tracks. The remote end triggers a Client.on(“unmute-audio”) callback when the audio track is enabled for the local stream.
unmuteAudio(): boolean
Note:
- For local streams, this method can only be used if audio is set to true when createStream.
- The audio track is on by default. If you call muteAudio, you can call this method to enable audio.
Returns boolean
setAudioOutput
What it does: Set the audio output. The method can set the audio output device of the subscription stream and switch the loudspeaker during the call. This method can be called before or after the subscription stream is played.
setAudioOutput(deviceId: string, onSuccess?: function, onFailure?: function): void
name | type | description |
---|---|---|
deviceId | string | Device ID, Can be passed through getDevices, The kind attribute of the device should be “audiooutput” |
onSuccess | function | Set a successful callback |
onFailure | function | Set a failed callback |
Note: Mobile browsers do not support it.
setAudioVolume
What it does: Adjust the volume size. This method can adjust the volume of the subscription stream (the volume attribute of the corresponding node element).
setAudioVolume(volume: number): void
name | type | description |
---|---|---|
volume | number | Volume, ranging from 0 (mute) to 100 (loudest) |
getAudioVolume
What it does: Get the volume size. This method can obtain the volume of the subscription stream (the volume attribute of the corresponding node element).
getAudioVolume(): number
Returns number
Range from 0 (mute) to 100 (loudest)
isAudioPlaying
What it does: Returns whether the audio stream is currently played in the play state.
isAudioPlaying(): boolean
Returns boolean
True: the audio stream is being rendered or played. False: the audio stream is not rendered.
isPubedAudio
What it does: Whether the publisher of the stream releases audio. That is, the publisher returns false, if muteAudio otherwise returns true.
isPubedAudio(): boolean
Returns boolean
true: Released audio false: Do not release audio
Video
hasVideo
What it does: Get the video flag. The method obtains the video track in the audio and video stream and can be used with replaceTrack.
hasVideo(): boolean
Returns: boolean
true: The audio and video stream object contains video resources. false: Video resources are not included in the audio and video stream object.
playVideo
What it does: Play the video stream. This method plays video streams
playVideo(HTMLElementID: string, options?: object, onCallback?: function): void
// example:
stream.playVideo("remote_stream_id", {fit: "contain"}, function(StreamPlayError){
console.log("playVideo StreamPlayError", StreamPlayError);
});
name | type | description |
---|---|---|
HTMLElementID | string | 节点 ID |
options | object | The options for streaming playback are configured as follows: 1. fit?: “cover” | “contain”: Set the display mode for video playback. You can choose “cover” and “contain”. The default is “cover”. The difference between cover mode and contain mode is as follows: * Cover mode: priority is given to ensuring that the window is filled. The video size is scaled proportionally until the entire window is filled with video. If the length and width of the video is different from that of the display window, the video stream will be clipped according to the proportion of the display window or the image will be stretched to fill the window. You can refer to the cover option of object-fit in the CSS attribute. * Contain mode: priority is given to ensuring that all video content is displayed. The video size is scaled proportionally until one side of the video window is aligned with the window frame. If the video size is not consistent with the display window size, on the premise of maintaining the aspect ratio, the video is scaled and filled with the window. There will be a black edge around the scaled video. You can refer to the contain option of object-fit in the CSS attribute. 2. mirror?: boolean: Used to indicate whether the video is displayed in a mirror way. The default is false. 3. loader?: boolean: Used to indicate whether the ‘loading’ style is displayed when the video data is not loaded. Default is true。 |
onCallback | function | Whether the playback is successful or not. The callback parameter carries StreamPlayError. This parameter is null/undefined if the playback is successful. If the playback fails, you can find out the possible reasons through StreamPlayError. StreamPlayError: See “CloudHubRTC Data object document” Description of Stream Play Error |
unplayVideo
What it does: Stop the video stream. Call this method to stop playing the video stream “Stream.playVideo”.
unplayVideo(): void
resumeVideo
What it does: Resume audio stream playback.
This method is generally called when the playback fails after calling Stream.playVideo.
resumeVideo(): Promise<any>
Returns Promise
muteVideo
What it does: Disable video tracks.
For a local stream, calling this method stops sending video, and the remote end triggers a Client.on(“mute-video”) callback.
For a remote stream, calling this method will not receive the video and will stop playing the video.
muteVideo(): boolean
Note: For locally created streams, set video to true when createStream to use this method.
Returns: boolean
true: Video track disabled successfully.
false: Failed to disable video track, possible reasons include no video, stream not initialized, video track has been disabled, and so on.
unmuteVideo
What it does: Enable video tracks.
This method enables video tracks. Client.on(“unmute-video”) callback will be triggered by the remote end when the video track is enabled for the local stream.
unmuteVideo(): boolean
Note:
- For locally created streams, set video to true when createStream to use this method.
- The video track is enabled by default. If you call muteVideo, you can call this method to enable video.
Returns boolean
true: Video track enabled successfully.
false: Failed to enable video track. Possible reasons include no video, uninitialized stream, enabled video track, and so on.
setVideoProfile
What it does: Set video properties.
This method sets the video properties of the local stream.
Valid only for stream type video (that is, stream.getType() = “video”).
setVideoProfile(profile: object): object
// example:
stream.setVideoProfile({width: 320, height:240, fps:15});
name | type | description |
---|---|---|
profile | object | Video attributes, with the following attributes: * width?:number Video width, default is the default video width. * height?:number Video height, the default is the default video height. * fps?:number The video frame rate, the default is the default video frame rate. |
Note:
- Dynamic modification of video attributes only supports Chrome 63 and above and Safari 11 and above.
- Dynamic modification of video properties on some iOS devices may cause black edges to appear in the video.
- Avoid calling this method when publishing the stream.
- When multi-stream mode (enableMultiStream) is enabled, the video resolution cannot be adjusted upward. The issue is known to Chromium.
- If you do not call setVideoProfile, the video resolution is the default video resolution, and the video frame rate is the default video frame rate.
- SDK limits the frame rate to no more than 30. If you want to adjust the value of this limit, you can use CloudHubRTC.DEVICE_ADAPTER_CONFIG.MAX_VIDEO_FPS to set it.eg: CloudHubRTC.DEVICE_ADAPTER_CONFIG.MAX_VIDEO_FPS = 60。
Returns object
Returns the actual set video properties, such as: {width: 320, height:240, fps:15}。
Video resolution reference form
Resolution (width × height) | Frame rate (FPS) | Chrome | Firefox | Safari | Notes |
---|---|---|---|---|---|
80 × 45 | 10 | ✓ | |||
80 × 48 | 10 | ✓ | |||
80 × 60 | 10 | ✓ | |||
176 × 144 | 10 | ✓ | |||
200 × 150 | 10 | ✓ | |||
120 × 120 | 15 | ✓ | |||
160 × 120 | 15 | ✓ | Mainstream | ||
180 × 180 | 15 | ✓ | |||
240 × 180 | 15 | ✓ | |||
320 × 180 | 15 | ✓ | Mainstream | ||
240 × 240 | 15 | ✓ | |||
320 × 240 | 10 | ✓ | |||
320 × 240 | 15 | ✓ | Mainstream | ||
424 × 240 | 15 | ✓ | |||
360 × 360 | 15 | ✓ | |||
360 × 360 | 30 | ✓ | |||
480 × 360 | 15 | ✓ | |||
480 × 360 | 30 | ✓ | |||
640 × 360 | 15 | ✓ | Mainstream | ||
640 × 360 | 24 | ✓ | |||
640 × 360 | 30 | ✓ | |||
480 × 480 | 15 | ✓ | ✓ | ✓ | |
480 × 480 | 30 | ✓ | ✓ | ✓ | |
640 × 480 | 10 | ✓ | ✓ | ✓ | |
640 × 480 | 15 | ✓ | ✓ | ✓ | Mainstream |
640 × 480 | 30 | ✓ | ✓ | ✓ | |
848 × 480 | 15 | ✓ | ✓ | ✓ | |
848 × 480 | 30 | ✓ | ✓ | ✓ | |
960 × 720 | 15 | ✓ | ✓ | ✓ | |
960 × 720 | 30 | ✓ | ✓ | ✓ | |
1280 × 720 | 15 | ✓ | ✓ | ✓ | Mainstream |
1280 × 720 | 30 | ✓ | ✓ | ✓ | |
1920 × 1080 | 15 | ✓ | ✓ | ||
1920 × 1080 | 30 | ✓ | ✓ | Mainstream |
For more information on the form, please see Video resolution form 。
Note:
- Whether the video can achieve a resolution of more than 1080p depends on the performance of the device, which may not be possible on devices with lower performance. If the 720p resolution is used and the performance of the device fails to keep up, it is possible that the frame rate is too low.
- With the upgrade of the browser, the resolution support of the browsers listed in the above table may be incomplete, depending on the actual situation.
- Some versions of some browsers may not fully support the resolution listed in the table above, in which case it is recommended to use the mainstream resolution (that is, the resolution marked “mainstream” in the table above).
- Safari browsers do not support custom video frame rate (default is 30 fps). If you set a video frame rate other than 30 fps,Safari, the browser may modify or reject your setting.
- Due to the limitations of devices and browsers, some browsers may not be able to fully adapt to the set Video Profile, in which case the browser will automatically adjust the resolution.
getAttributes
What it does: Get a custom attribute
/**Get a custom attribute
* @returns {
mute_audio: string;
sourceid: string;
type: string
videofps: number
videoheight: number
videowidth: number
}
*/
stream.getAttributes();
getVideoProfile
What it does: Gets the video properties of the local stream.
Only valid for stream type video (ie: stream.getType() === “video”).
getVideoProfile(): object
// example:
stream.getVideoProfile();
Returns object
Set video attributes, and return the video attributes that have been successfully set, otherwise return the default video attributes, such as: {width: 320, height:240, fps:15}
。
getType
What it does: Get the type of the stream.
This method returns the type of the current stream.
getType(): string
Note: The current types are “video” 、“media” 、“screen”、“file”
Returns string
getSourceID
What it does: Gets the sourceID of the stream.
This method returns the sourceID of the current stream.
getSourceID(): string
Returns string
getAudioLevel
What it does: Gets the current volume.
This method gets the volume of the current moment. If you want to indicate a change in local or remote volume, we recommend that you use the setTimeout or setInterval method to obtain it in real time.
getAudioLevel(): number | void
// example:
setInterval(function() {
var audioLevel = stream.getAudioLevel();
// Use audioLevel to render the UI
}, 100)
Note: Safari 11/12.0 does not support.
Returns: number | void Get the volume value, range of value [0,100]。
getId
What it does: Get the audio and video stream ID.
The audio and video stream ID can be obtained by this method.
getId(): string
// example:
stream.getId();
Note: Stream ID is based on uid、type、sourceID Generate, stream ID format is: uid:type:sourceID
Returns: string
getStats
What it does: Get connecting data.
The method acquires the connection data of the audio and video stream.
getStats(onCallback: function): void
// example:
localStream.getStats((errinfo, stats) => {
console.log("Local Stream stats:", stats, errinfo);
});
remoteStream.getStats((errinfo, stats) => {
console.log("Remote Stream stats:", stats, errinfo);
});
name | type | description |
---|---|---|
onCallback | function | The callback contains the connection statistics of the audio / video stream. The callback parameters contain errinfo and stats. If errinfo is not undefined, it means that the data acquisition failed. Otherwise, errinfo is undefined, stats is LocalStreamStats/RemoteStreamStats。 If it is a published stream, the statistics are LocalStreamStats.If it is a subscription stream, the statistic is RemoteStreamStats. LocalStreamStats: See “CloudHubRTC Data object document” Description of Local Stream Stats. RemoteStreamStats: See “CloudHubRTC Data object document” Description of Remote Stream Stats |
Note:
- There may be delays in some statistics.
- Edge browser does not support it.
getVideoTrack
What it does: Get the video track.
The method obtains the video track in the audio and video stream and can be used with replaceTrack.
getVideoTrack(): MediaStreamTrack | void
Returns: MediaStreamTrack | void
If the audio and video stream contains a video track, it will be returned as a MediaStreamTrack object.
replaceTrack
What it does: Replace audio and video tracks.
This method can replace the audio and video track in the local audio and video stream.
After the local stream is released, you can use this method to switch cameras or microphones.
The new audio and video tracks can be obtained through DeviceManager’s getVideoTrack/getAudioTrack and other methods.
The replaced audio and video track will be forced to stop.
replaceTrack(mediaStreamTrack: MediaStreamTrack, onSuccess?: function, onFailure?: function): void
// example:
stream.replaceTrack(newVideoTrack);
name | type | description |
---|---|---|
mediaStreamTrack | MediaStreamTrack | New audio and video tracks. MediaStreamTrack: See “CloudHubRTC Data object document” Description of MediaStreamTrack |
onSuccess | function | Method call successful callback |
onFailure | function | A callback that fails to call a method, and the failed parameters carry a format such as: {errflag: “NOT_ALLOWED_ERROR”, message: “Permission denied”}. errflag The following values may appear in the field: * “INVALID_TRACK”: The new incoming MediaStreamTrack object is not recognized. Please check the incoming object. * “MEDIASTREAM_TRACK_NOT_FOUND”: No replacement was found, such as trying to replace the Track of a video on a pure audio stream. * “NO_STREAM_FOUND”: Can’t find the local stream, you can’t replace it. * “NOT_SUPPORT”: The browser does not support replacement. * “UNDEFINED_ERROR”: Undefined error. |
Note:
- Support for Chrome 65 and the latest version of the Firefox browser.
- This method may not work on some mobile devices.
- Firefox does not support switching audio tracks between different microphones.
- This method is not supported by some external audio devices in Safari.
- The subscriber is not aware that the audio and video track has been replaced.
isVideoPlaying
What it does: Returns whether the video stream is currently playing in the play state.
Call this method to stop playing “video stream played by Stream.playVideo”.
isVideoPlaying(): boolean
Returns boolean
true: The video stream is being rendered or played.
false: The video stream is not rendered.
true: Audio track enabled successfully.
false: Failed to enable audio track, possible reasons include no audio, stream not initialized, audio track has been enabled, and so on.
isRemote
What it does: Whether it is a remote stream.
isRemote(): boolean
Returns boolean
true: Remote stream.
false: Local stream.
isPubedVideo
What it does: Whether the publisher of the stream publishes the video.
That is, the publisher returns false, if muteVideo otherwise returns true.
isPubedVideo(): boolean
Returns boolean
true: Released the video.
false: Do not release video
setMirror
setMirror(isMirror:boolean): void
What it does: Set whether or not used image.
name | type | description |
---|---|---|
isMirror | boolean | Whether to use mirror images. True means to use images, and false means not to use them. |
close
What it does: Close the audio and video stream.
This method closes the video stream or audio stream. Calling this method will cancel the access rights of the camera and microphone.
close(): void
User
getUserId
What it does: Gets the user id of the stream.
This method returns the user id of the current stream.
getUserId(): string
Returns string
设备
switchDevice
What it does: Switch input devices.
This method can switch the media input device of the local stream:
An audio input device, such as a microphone
A video input device, such as a camera
The flow has been released, and there is no need to re-discharge after switching.
The following cases cannot be used:
- Mobile browser
- SwitchDevice parameter type is not “audio” | “video”
- Stream type is not “video” (that is: stream.getType() != “video”)
- Stream is not a local stream
- Streams created using self-collection attributes (audioSource and videoSource)
- Multi-streaming mode does not support switching video devices, that is, enableMultiStream is set to multi-streaming and type is “video”
switchDevice(type: "audio" | "video", deviceId: string, onSuccess?: function, onFailure?: function): void
name | type | description |
---|---|---|
type | string | The type of device, such as the following values: * “audio”: Audio input device < br/>* “video”: Video input device |
deviceId | string | The ID of the device, Can be passed through getDevices |
onSuccess | function | Callback for successful switching. |
onFailure | function | Switch the callback that failed, and the failed parameters are in a format such as: {errflag: "NOT_ALLOWED_ERROR", message: "Permission denied"} 。 errflag The following values may occur:* “NOT_SUPPORT”: The browser is not supported. * “INVALID_ARG”: Invalid parameter. * “NOT_ALLOWED_ERROR”: The user refuses to grant permission to the corresponding camera or microphone. * “NOT_READABL_EERROR”: The camera or microphone is occupied. * “ABORT_ERROR”: Device abort error. * “NOT_FOUND_ERROR”: Did not find the device. * “OVER_CONSTRAINED_ERROR”: The configured constraint cannot meet the requirements. * “SECURITY_ERROR”: Security error, webpage use of device media is prohibited. Whether this mechanism is turned on or off depends on the preferences of individual users. * “TYPE_ERROR”: Device constraints are set to false * “REQ_TIMEOUT”: Request timeout. * “UNDEFINED_ERROR”: Undefined error. 1. See Browser getUserMedia Interface error type 2. See “Constant declaration and supplementary notes” The error type of the browser’s getUserMedia interface failure. |
Note: Mobile browsers do not support it.
switchMobileCamera
What it does: Switch the front and rear cameras on the mobile.
For streams that have been released, there is no need to resend the streams after switching.
This method cannot be used in the following situations:
- Non-mobile browser
- Stream type is not “video” (that is: stream.getType() != “video”)
- Stream is not a local stream
- Streams created using self-collection attributes (audioSource and videoSource)
switchMobileCamera(onSuccess?: function, onFailure?: function): void
name | type | description |
---|---|---|
onSuccess | function | Callback for successful switching. |
onFailure | function | Switch the callback that failed, and the failed parameters are in a format such as: {errflag: "NOT_ALLOWED_ERROR", message: "Permission denied"} 。 errflag The following values may occur:* “NOT_SUPPORT”: The browser is not supported. * “INVALID_ARG”: Invalid parameter. * “NOT_ALLOWED_ERROR”: The user refuses to grant permission to the corresponding camera or microphone. * “NOT_READABL_EERROR”: The camera or microphone is occupied. * “ABORT_ERROR”: Device abort error. * “NOT_FOUND_ERROR”: Did not find the device. * “OVER_CONSTRAINED_ERROR”: The configured constraint cannot meet the requirements. * “SECURITY_ERROR”: Security error, webpage use of device media is prohibited. Whether this mechanism is turned on or off depends on the preferences of individual users. * “TYPE_ERROR”: Device constraints are set to false * “REQ_TIMEOUT”: Request timeout. * “UNDEFINED_ERROR”: Undefined error. 1. See Browser getUserMedia Interface error type 2. See “Constant declaration and supplementary notes” The error type of the browser’s getUserMedia interface failure. |
Note: Non-mobile browsers do not support it.