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
질문됨 4달 전125회 조회
1개 답변
1
수락된 답변

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
답변함 4달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠