You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @method getDisplayMedia - getDisplayMedia() method of the MediaStream interface prompts the user to select and grant permission to capture the contents or portion (such as a window) of their screen as a MediaStream.
* @method replaceTrack - The RTCRtpSender method replaceTrack() replaces the track currently being used as the sender's source with a new MediaStreamTrack.
constscreenTrack=stream.getTracks()[0];// local video stream
406
406
407
407
senders.current
408
408
?.find(sender=>sender.track?.kind==='video')
409
409
?.replaceTrack(screenTrack);
410
-
localVideo.current.srcObject=stream;// changing local video to display is being screen shared to the other peer
410
+
localVideo.current.srcObject=stream;// changing local video to display what is being screen shared to the other peer
411
411
412
-
screenTrack.onended=function(){
412
+
screenTrack.onended=function(){// ended event is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available
0 commit comments