IVS Real Time Streaming: System Audio while screen sharing

0

We are unable hear the system audio while sharing the screen in IVS Real Time Streaming (Stage). I am using below code to get the screenshare.

export async function getScreenshare() { const screenShareStream = await navigator.mediaDevices.getDisplayMedia({audio: true, video: true}); return screenShareStream; }

export async function getMic(deviceId) { let media; const audioConstraints = { deviceId: deviceId ? { exact: deviceId } : null, }; media = await navigator.mediaDevices.getUserMedia({ video: false, audio: audioConstraints, });

activeAudioStream = media;

return media.getTracks()[0]; }

Is there any solution for this problem?

Ramesh
posta 4 mesi fa125 visualizzazioni
1 Risposta
1
Risposta accettata

Please see the following demo which will illustrates sharing desktop audio:

https://codepen.io/amazon-ivs/pen/PoLYGBw

Also note the comments on that page:

This sample is used to demonstrate basic HTML / JS usage and broadcast audio from a screenshare a stage and broadcast. Reminder that Screenshare audio can only be captured in Chrome, Edge, and Opera. Additionally, on Linux and MacOS only the audio of a tab can be captured, no system audio. MDN Screenshare Audio Support

profile picture
con risposta 4 mesi fa
profile picture
ESPERTO
verificato 2 mesi fa
  • Thank you sir

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande