MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / getMixedVideoStream

Function getMixedVideoStream

src/__tests__/MediaStreamRecorder.js:550–572  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548 }
549
550 function getMixedVideoStream() {
551 resetVideoStreams();
552
553 var capturedStream;
554
555 if ('captureStream' in canvas) {
556 capturedStream = canvas.captureStream();
557 } else if ('mozCaptureStream' in canvas) {
558 capturedStream = canvas.mozCaptureStream();
559 } else if (!self.disableLogs) {
560 console.error('Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features');
561 }
562
563 var videoStream = new MediaStream();
564
565 capturedStream.getVideoTracks().forEach(function(track) {
566 videoStream.addTrack(track);
567 });
568
569 canvas.stream = videoStream;
570
571 return videoStream;
572 }
573
574 function getMixedAudioStream() {
575 // via: @pehrsons

Callers 1

getMixedStreamFunction · 0.85

Calls 1

resetVideoStreamsFunction · 0.85

Tested by

no test coverage detected