Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72931

RecordRTC recorded content in Safari doesn't have correct file extension

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.9.10, 3.10.7, 3.11.3
    • Media, Text editor Atto
    • None
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE

      When I was looking for a solution for MDL-65943, I noticed that even though Safari can record audio and video, it cannot play the audio and video it just recorded, even though they are h264 and aac coded. Looking into the code and I realized that this is due to moodle hardcoded RecordRTC recorded content in the format of ogg and webm, while it should be mp4 in Safari: https://github.com/moodle/moodle/blob/b8e5f7b428aaf5e97cc6ec9b10df949651b73094/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-recording/moodle-atto_recordrtc-recording.js#L200

      I suggest we determine the file extension (ogg/webm/mp4) based on the value returned by select_rec_options in https://github.com/moodle/moodle/blob/b8e5f7b428aaf5e97cc6ec9b10df949651b73094/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-recording/moodle-atto_recordrtc-recording.js#L462

      Also, currently, file names are generated based on a random number. Maybe it makes sense to rename the file based on the current time as well.

      Reference: https://stackoverflow.com/questions/66902406/which-mime-types-are-supported-by-mediarecorder-on-safari

       

            Unassigned Unassigned
            Crist Crist
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.