static/tests/frontend/specs/race_conditions.js
// wrap getUserMedia such that it grabs a copy of audio and video tracks for inspection after it's done
wrap getUserMedia such that it grabs a copy of audio and video tracks for inspection after it's done
wrap getUserMedia such that it grabs a copy of audio and video tracks for inspection after it ' s done
function wrapGetUserMedia() {
    const chrome$ = helper.padChrome$;
    const oldGetUserMedia = chrome$.window.navigator.mediaDevices.getUserMedia;
    chrome$.window.navigator.mediaDevices.getUserMedia = function (mediaConstraints) {
      return oldGetUserMedia.call(chrome$.window.navigator.mediaDevices, mediaConstraints)
          .then((stream) => {
            audioTrack = stream.getAudioTracks()[0];
            videoTrack = stream.getVideoTracks()[0];
            return stream;
          });
    };
  }
function wrapGetUserMedia ( ) { const chrome$ = helper . padChrome$ ; const oldGetUserMedia = chrome$ . window . navigator . mediaDevices . getUserMedia ; chrome$ . window . navigator . mediaDevices . getUserMedia = function ( mediaConstraints ) { return oldGetUserMedia . call ( chrome$ . window . navigator . mediaDevices , mediaConstraints ) . then ( ( stream ) => { audioTrack = stream . getAudioTracks ( ) [ 0 ] ; videoTrack = stream . getVideoTracks ( ) [ 0 ] ; return stream ; } ) ; } ; }
wrap getUserMedia such that it grabs a copy of audio and video tracks for inspection after it's done
wrap getUserMedia such that it grabs a copy of audio and video tracks for inspection after it ' s done