MediaRecorder in Safari

PennController for IBEX Forums Support MediaRecorder in Safari

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8282
    bta
    Participant

    I can’t seem to get projects that use MediaRecorder elements to run in Safari — I get the following error message that initiates the recorder:
    The following error occurred: TypeError: undefined is not an object (evaluating 'w("audio").mimeType')
    I get this error even in a blank project started with the “Oral Production (MediaRecorder)” link under “Start a new project.

    I searched the forum and found that people have had issues with MediaRecorder elements in Safari, but I am wondering if those posts were from before they became fully supported by Safari (since Safari 14, which was released Sep 2020).

    (For whatever it’s worth: I’m on Safari 15.4, using macOS 12.3.)

    #8285
    Jeremy
    Keymaster

    Hi,

    The PennController MediaRecorder element (which relies on, but is distinct from, the MediaRecorder API) only checks webm and ogg for audio, but Safari 14+ only references mp4 as supported, which is why you get that error

    I will need to add audio/mp4 to the next release, and raise an explicit error message when no supported type is found. In the meantime, feel free to upload a copy of PennElement_mediarecorder.js to your project’s Modules folder, replacing line audio: {'audio/webm': 'webm', 'audio/ogg': 'ogg'}, with audio: {'audio/webm': 'webm', 'audio/ogg': 'ogg', 'audio/mp4': 'mp4'},. You’ll get an error about MediaRecorder being defined multiple times, but I think the experiment should still run ok

    Jeremy

    #8292
    bta
    Participant

    Great, yes, that worked! Thank you!

    #10910
    antonm
    Participant

    I don’t seem to have PennElement_mediarecorder.js. Is that normal? How can I work around this? I understand that this only applies to desktop computers and not Iphone?

    #10940
    Jeremy
    Keymaster

    Hi,

    The PennController library comes with the MediaRecorder element by default: you shouldn’t have a PennElement_mediarecorder.js file in your project, barring exceptions

    Jeremy

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.