amazon-kinesis-video-streams-webrtc-sdk-js
amazon-kinesis-video-streams-webrtc-sdk-js copied to clipboard
Screen Sharing while Live streaming using AWS KVS Signaling channel
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
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);
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
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?