amazon-kinesis-video-streams-webrtc-sdk-js icon indicating copy to clipboard operation
amazon-kinesis-video-streams-webrtc-sdk-js copied to clipboard

Screen Sharing while Live streaming using AWS KVS Signaling channel

Open HaseebIftikhar5275501 opened this issue 3 years ago • 3 comments

I have developed Live Streaming via Master and Viewer using AWS KVS. My requirement is to allow screen sharing while Streaming. How to incorporate this feature in using KVS

HaseebIftikhar5275501 avatar Mar 25 '21 06:03 HaseebIftikhar5275501

screen share is the same with webcam share just need to replace the code below: webcam: await navigator.mediaDevices.getUserMedia(constraints);

screen share: await navigator.mediaDevices.getDisplayMedia(constraints);

jay-shiftasia avatar Apr 02 '21 06:04 jay-shiftasia

I added the same code but how to seemlessly swtich to screen share while broadcasting. As I have checked on local stream switching is done but the viewer cannot see the shared screen

HaseebIftikhar5275501 avatar Apr 03 '21 09:04 HaseebIftikhar5275501

I have a similar issue.

Although I understand that to solve the issue stated by @HaseebIftikhar5275501 you can use RTCRtpSender.replaceTrack() providing the video track from the right media stream,

Turning the streams off an turning them back on (When you want to stop camera/microphone) requires removing the track and not replacing it (You can set track.enabled to false but the connection to the camera will still be active which is a bad practice and bad UX) in which case the connection needs to be negotiated as stated here and following this documentation I understand that an SDP offer needs to be sent but it seems that it's not possible via SignalingClient.sendSdpOffer().

How can this be achieved?

xruslanx123 avatar Oct 30 '21 18:10 xruslanx123