Updated on 2023-11-01 GMT+08:00

FAQ

  • Is userName mandatory when I join a room?

    This parameter is optional. The values of userName and userId are defined by the app and can be the same.

    • userId: (mandatory) user ID. The type is string[64]. The value of userId must be unique in the app. The value of userId can contain letters, digits, hyphens (-), and underscores (_).
    • userName: (optional) user nickname. The type is string[128].
  • How do I obtain microphoneId and cameraId? Why are they mandatory?

    microphoneId and cameraId are mandatory for audio and video calls. The audio and video corresponding to the IDs are captured when a stream is created.

    You can call the getDevices, getCameras, and getMicrophones APIs to obtain the media input and output, microphone, and camera IDs.

  • If the camera is not turned on, will the default profile picture be displayed?

    If the camera cannot be obtained but the microphone can be obtained, a black screen is displayed and audio streams exist. If neither the microphone nor the camera can be obtained, the local preview fails and the default profile picture is not displayed.

  • Do I need to release the camera after I exit a room?

    You do not need to manually release the camera when you exit the room. The camera is automatically disabled and no longer captures data.

  • How and when do I perform authentication?

    For details, see Access Authentication.

  • What do I do when the client fails to join the room as a joiner?

    The role parameter transferred when the client calls join is incorrect. The value of role is a number. If the client transfers a string, room joining will fail.

  • What do I do if the local stream fails to be created and the message "Cannot read property 'getUserMedia' of undefined" is displayed on the console, indicating that the media source cannot be obtained?

    The possible causes are as follows:

    Cause 1: The system does not allow the app to access media sources such as the camera. For details about how to solve the problem, see Granting the Permissions of Accessing Cameras or Microphones to a Browser.

    Cause 2: According to the browser rules, the camera and microphone permissions can be accessed only in https:// or localhost mode.

    Cause 3: The camera or other devices are occupied by other applications.

  • If I have visited an app website developed using the Web SDK and deleted the permissions of the website, the camera and microphone may fail to be enabled. What do I do?

    Ensure that the camera/microphone access permission is granted to the browser. For details, see Granting the Permissions of Accessing Cameras or Microphones to a Browser. Click the icon in the upper left corner of the page and grant the permissions.

  • I enter an online audio URL that can be opened in a browser. However, audio mixing fails to be enabled when I use the audio mixing function of the Web SDK. What do I do?

    Check whether the online audio file download server supports cross-domain access. Due to the security policy of the browser, cross-domain access must be supported. Otherwise, the request fails.

    Only the remote end can hear the mixed audio.

  • What is the top-N-audio mode (top three loudest participants)?

    The top-N-audio mode is also called the top three loudest participant mode. After the top-N-audio mode is enabled, a user does not need to call an API to subscribe to the audio of a remote user. The local user can receive the audio of the three users who speaks loudest in the current room. For details about the API, see Switching the Audio Mode.

  • Is the setVolume4TopThree API used to configure the volume of the top three loudest participants in the room? How many parameters should I pass?

    Yes. Only one parameter needs to be passed.

  • Can the SparkRTC Web SDK be integrated if the service app can use only the HTTP protocol?

    It can be integrated but is not recommended. You need to manually disable the security policy function. Open a tab on the Chrome, enter chrome://flags/#unsafely-treat-insecure-origin-as-secure, enable the function, and add the app loading address to the ignore list.

  • What do I do if I fail to join a room using the Web SDK in Firefox?

    Check whether the H.264 plug-in of the Firefox browser is installed. Enter about:addons in the address box of the browser. The plug-in installation page is displayed. Check whether the H.264 plug-in is installed. If the plug-in is not installed, install it on the page.

  • What do I do if screen sharing using macOS Chrome fails and "NotAllowedError: Permission denied by system" or "NotReadableError: Could not start video source" is displayed?

    The possible cause is that the screen recording permission of the browser is not enabled. On your computer, go to Settings > Security & Privacy > Privacy > Screen Recording, enable Chrome screen recording authorization, and restart Chrome.