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

add default mimeType if none is specified #3495

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jadeddelta
Copy link
Collaborator

this PR closes #3494, providing a default mimeType: "video/webm" for initializeCameraRecorder() and updating the docs to reflect this change

Copy link

changeset-bot bot commented Jan 31, 2025

🦋 Changeset detected

Latest commit: d258a29

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
jspsych Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jadeddelta jadeddelta requested a review from jodeleeuw January 31, 2025 22:35
@jodeleeuw
Copy link
Member

@jadeddelta I think we might need to add a codec part to the string. See lookit/lookit-jspsych#127 (comment).

@becky-gilbert do you think we should use something like your function that gets compatible mime types?

@becky-gilbert
Copy link
Collaborator

@jodeleeuw @jadeddelta sorry for the slow response. Yes you could definitely use the getCompatibleMimeType function we're using in lookit-jspsych to find a compatible mime type from a list, or write something similar.

Or you could stick with a single default option, it just depends on the breadth of browser/versions you want to support. The important thing is to make sure to specify a codecs value in all of the mime type strings, e.g. use "video/webm;codecs=vp9,opus" rather than just "video/webm".

We're using webm, and "video/webm;codecs=vp9,opus" would work for recent versions of the most popular browsers. But that won't work on Safari. Another good option is mp4: "video/mp4; codecs="avc1.42E01E, mp4a.40.2" (I can't remember why we didn't use this before - I think it wasn't available in Chrome before but looks like it is now?).

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

Successfully merging this pull request may close these issues.

Provide a default value for initializing the media recorder
3 participants