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

Record not working with Svelte and ios #292

Open
SafetZahirovic opened this issue Nov 14, 2024 · 0 comments
Open

Record not working with Svelte and ios #292

SafetZahirovic opened this issue Nov 14, 2024 · 0 comments
Labels
priority:high type:bug Something isn't working

Comments

@SafetZahirovic
Copy link

I am trying to record a video with etro using Svelte. It works fine on desktop (chrome) but it doesn't work in iOS on native device. I am using iphone 16 on latest ios version.

After som debugging, i've identified that there is a problem in ondataavailable function in MediaRecorder. The event passed inn seems incorrect. See picture below:

Screenshot 2024-11-14 at 15 50 54

The event doesnt look like to be a Blob event.

This is the code i'm using:

onclick={async () => {
      let options;
      if (MediaRecorder.isTypeSupported("video/webm; codecs=vp9")) {
        options = { mimeType: "video/webm; codecs=vp9" };
      } else if (MediaRecorder.isTypeSupported("video/webm")) {
        options = { mimeType: "video/webm" };
      } else if (MediaRecorder.isTypeSupported("video/mp4")) {
        options = { mimeType: "video/mp4" };
      } else {
        console.error("no suitable mimetype found for this device");
      }
      const blob = await movie.record({
        frameRate: 30,
        duration: length,
        type: options?.mimeType,
      });
      saveBlob(blob, "video");
    }}

On Chrome on mac os, it's working as intended:

Screenshot 2024-11-14 at 15 57 36

I really don't know what the issue is.

@clabe45 clabe45 added type:bug Something isn't working priority:high labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants