@@ -370,7 +370,7 @@ const VideoCall = ({ URL, mediaOptions }) => {
370
370
* @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.
371
371
* @see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
372
372
*
373
- * @method getTracks - getTracks() method of the MediaStream interface returns an array of all the MediaStreamTrack objects
373
+ * @method getTracks - getTracks() method of the MediaStream interface returns an array of all the MediaStreamTrack objects in the stream
374
374
* @see https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/getTracks
375
375
*
376
376
* @method replaceTrack - The RTCRtpSender method replaceTrack() replaces the track currently being used as the sender's source with a new MediaStreamTrack.
@@ -381,12 +381,12 @@ const VideoCall = ({ URL, mediaOptions }) => {
381
381
navigator . mediaDevices . getDisplayMedia ( )
382
382
. then ( stream => {
383
383
var _a , _b ;
384
- const screenTrack = stream . getTracks ( ) [ 0 ] ; //
384
+ const screenTrack = stream . getTracks ( ) [ 0 ] ; // local video stream
385
385
( _b = ( _a = senders . current ) === null || _a === void 0 ? void 0 : _a . find ( sender => { var _a ; return ( ( _a = sender . track ) === null || _a === void 0 ? void 0 : _a . kind ) === 'video' ; } ) ) === null || _b === void 0 ? void 0 : _b . replaceTrack ( screenTrack ) ;
386
- localVideo . current . srcObject = stream ; // changing local video to display is being screen shared to the other peer
386
+ localVideo . current . srcObject = stream ; // changing local video to display what is being screen shared to the other peer
387
387
screenTrack . onended = function ( ) {
388
388
var _a , _b ;
389
- ( _b = ( _a = senders . current ) === null || _a === void 0 ? void 0 : _a . find ( sender => { var _a ; return ( ( _a = sender . track ) === null || _a === void 0 ? void 0 : _a . kind ) === 'video' ; } ) ) === null || _b === void 0 ? void 0 : _b . replaceTrack ( localStream . current . getTracks ( ) [ 1 ] ) ;
389
+ ( _b = ( _a = senders . current ) === null || _a === void 0 ? void 0 : _a . find ( sender => { var _a ; return ( ( _a = sender . track ) === null || _a === void 0 ? void 0 : _a . kind ) === 'video' ; } ) ) === null || _b === void 0 ? void 0 : _b . replaceTrack ( localStream . current . getTracks ( ) [ 1 ] ) ; //
390
390
localVideo . current . srcObject = localStream . current ; // changing local video displayed back to webcam
391
391
} ;
392
392
} ) ;
@@ -493,9 +493,7 @@ const VideoCall = ({ URL, mediaOptions }) => {
493
493
justifyContent : 'center' ,
494
494
marginTop : '10px'
495
495
} } ,
496
- react_1 . default . createElement ( "button" , { className : 'share-btn' , "data-testid" : 'share-screen-btn' , onClick : ( ) => shareScreen ( ) ,
497
- // style={buttonStyling}
498
- style : {
496
+ react_1 . default . createElement ( "button" , { className : 'share-btn' , "data-testid" : 'share-screen-btn' , onClick : ( ) => shareScreen ( ) , style : {
499
497
backgroundColor : '#C2FBD7' ,
500
498
borderRadius : '50px' ,
501
499
borderWidth : '0' ,
@@ -508,19 +506,11 @@ const VideoCall = ({ URL, mediaOptions }) => {
508
506
height : '50px' ,
509
507
padding : '0 25px' ,
510
508
} } , "Share Screen" ) ,
511
- react_1 . default . createElement ( "button" , { className : 'end-btn' , "data-testid" : 'end-call-btn' , onClick : ( ) => endCall ( false ) ,
512
- // style={{
513
- // ...buttonStyling,
514
- // backgroundColor:'#ff6961',
515
- // color:'#28282B'
516
- // }}
517
- style : {
518
- // backgroundColor: '#C2FBD7',
509
+ react_1 . default . createElement ( "button" , { className : 'end-btn' , "data-testid" : 'end-call-btn' , onClick : ( ) => endCall ( false ) , style : {
519
510
backgroundColor : '#ff6961' ,
520
511
borderRadius : '50px' ,
521
512
borderWidth : '0' ,
522
513
boxShadow : 'rgba(0, 0, 0, 0.15) 0px 2px 8px' ,
523
- // color: '#008000',
524
514
color : '#28282B' ,
525
515
cursor : 'pointer' ,
526
516
display : 'inline-block' ,
0 commit comments