Skip to content

Commit 5cc290e

Browse files
authored
Merge pull request #53 from oslabs-beta/feature/raisa-cicd
updated video call component styling
2 parents 3b72eeb + 988e72e commit 5cc290e

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

dist/src/components/VideoCall.js

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ const VideoCall = ({ URL, mediaOptions }) => {
370370
* @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.
371371
* @see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
372372
*
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
374374
* @see https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/getTracks
375375
*
376376
* @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 }) => {
381381
navigator.mediaDevices.getDisplayMedia()
382382
.then(stream => {
383383
var _a, _b;
384-
const screenTrack = stream.getTracks()[0]; //
384+
const screenTrack = stream.getTracks()[0]; // local video stream
385385
(_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
387387
screenTrack.onended = function () {
388388
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]); //
390390
localVideo.current.srcObject = localStream.current; // changing local video displayed back to webcam
391391
};
392392
});
@@ -493,9 +493,7 @@ const VideoCall = ({ URL, mediaOptions }) => {
493493
justifyContent: 'center',
494494
marginTop: '10px'
495495
} },
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: {
499497
backgroundColor: '#C2FBD7',
500498
borderRadius: '50px',
501499
borderWidth: '0',
@@ -508,19 +506,11 @@ const VideoCall = ({ URL, mediaOptions }) => {
508506
height: '50px',
509507
padding: '0 25px',
510508
} }, "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: {
519510
backgroundColor: '#ff6961',
520511
borderRadius: '50px',
521512
borderWidth: '0',
522513
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 8px',
523-
// color: '#008000',
524514
color: '#28282B',
525515
cursor: 'pointer',
526516
display: 'inline-block',

dist/src/constants/mediaStreamConstraints.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const constraints = {
1616
width: { min: 640, ideal: 1920, max: 1920 },
1717
height: { min: 480, ideal: 1080, max: 1080 },
1818
},
19-
audio: true
19+
// audio: true
20+
audio: {
21+
echoCancellation: true
22+
}
2023
};
2124
exports.default = constraints;

0 commit comments

Comments
 (0)