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
gefragt vor 4 Monaten125 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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
beantwortet vor 4 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
  • Thank you sir

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen