arctos-SDK For developsarctos-SDK For develops
Home
Okuma
arctos
Contact
  • English
  • 繁體中文
Home
Okuma
arctos
Contact
  • English
  • 繁體中文
  • Guide

    • get-started
  • Spec

    • Peer to Peer Direct
    • Relay based
  • Api

    • Overview
    • Auth
    • Task
    • Business
    • Room
  • Peer to Peer Direct

    • overview
    • installization
    • features

      • initial_setting
      • room
      • camera
      • conference
      • microphone
      • speaker
      • share_screen
      • paint_board
      • recording
      • layout
  • Relay based

    • overview
    • installization
    • features

      • initial_setting
      • camera
      • microphone
      • speaker
      • share_screen
      • paint_board
      • share_message
      • switch_template
      • video_filters

Switch Microphone

When you have multiple sound devices, you can choose to use one of them.

//Create a list of usable speaker devices on the menu

const speakerSelect = await arctosSdkInstance.$meetingRoom.getSpeakerDevices();
speakerSelect.forEach(element => {
    var option = document.createElement("option");
    option.text = element.label;
    option.value = element.deviceId;
    document.querySelector('#switch-speaker-select').appendChild(option);
});

Click the select menu to switch devices.
//Select speaker to use

SwitchSpeaker = async function (e) {
    let val =  document.querySelector('#switch-speaker-select').value;
    arctosSdkInstance.$meetingRoom.setSpeakerDevice(val);
};

Toggle the user's speakers in the room on or off.
//Toggle the microphone on or off

toggleSpeakerClick = async function () {
    arctosSdkInstance.$meetingRoom.toggleSpeaker();
};

The following url is a sample code for switch the speaker.

Sample Code

Prev
microphone
Next
share_screen