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
preguntada hace 4 meses125 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
respondido hace 4 meses
profile picture
EXPERTO
revisado hace 2 meses
  • Thank you sir

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas