Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug using firefox with 'video/webm;codecs=vp8' #852

Open
ronaldohoch opened this issue Sep 12, 2023 · 1 comment
Open

Bug using firefox with 'video/webm;codecs=vp8' #852

ronaldohoch opened this issue Sep 12, 2023 · 1 comment

Comments

@ronaldohoch
Copy link

Hello Muaz-khan and other contributors!

Running this code:

    navigator.mediaDevices
      .getUserMedia({
        video: {
          deviceId: { exact: this.selectedVideoDeviceId },
          // width: { ideal: 99999 },
          // height: { ideal: 99999 }
        },
        audio: {
          deviceId: { exact: this.selectedAudioDeviceId }
        },
      })
      .then(async (stream: MediaStream) => {
        const sleep = m => new Promise(r => setTimeout(r, m));
        this.recorder = new RecordRTC(stream, {
          type: 'video',
          mimeType: 'video/webm;codecs=vp8',
          previewStream: () => {
          }
        });
       ///rest of code..

Throws this error:

image

@ronaldohoch
Copy link
Author

For a while, my workaround was that:

let navigatorCodec:RecordRTC.Options['mimeType'] = 'video/webm;codecs=vp8';
if (navigator.userAgent.includes('Firefox')) {
  navigatorCodec='video/webm;codecs=h264'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant