logo
On this page
2021-09-26

Sound issues

Products / Plugins:Video Call / Voice Call / Live streaming
Platform / Framework:iOS / Android / macOS / Windows

It can be handled as follows:

  1. Set the channel in OBS to mono.
  2. After setting the sound channel, there is sound in the stream, but the sound is abnormal (noise exists), and the sampling rate in OBS needs to be changed to 48K.

Since the local preview does not need to play its own sound, in order to avoid secondary collection of the sound during the preview, the developer needs to add the mute attribute to the video rendered by the push stream, and set the muted to "true".

Please check whether the video tag object corresponding to the pull stream is set with the muted mute attribute. When set to "true", it means mute, and "false" means non-mute.

Use interface configuration: zg.createStream({camera:{audio:true,video:false}}), so that the push stream will only have audio, and the browser will only ask for the microphone permission.

  1. Use "setPlayVolume" to pass in the stream name and set the volume to 0 to mute a stream. If you need to mute multiple streams, configure this interface in turn (call after the stream is pulled).
  2. Use "mutePlayStreamAudio" to pass in the stream name, and set "mute" to "false", so that the remote user's audio data will not be pulled. If you need to mute multiple streams, configure this interface in turn (you can call it before and after the stream is pulled).
  3. Use "muteSpeaker" to configure mute (off) audio output. After setting mute, all SDK sounds will not be played, including streaming, media player, etc.

After the microphone is turned off, the SDK will also push the mute data, so there will still be audio-related data in the push stream quality callback. Similar logic also has the interface "mutePublishStreamAudio".

Previous

Stream mixing issues

Next

Common audio issues