Enables a "Record Audio" option in the Media Importer when the importer is set to allow audio uploads
Provides an option to name the audio clip. Once saved, the recorded audio snippet is selected and importer into the widget.
Adds audio/webm as an additional supported MIME type. webm is a media-agnostic container that can handle both audio and video, so the PHP Plupload library we're using is flagging recording MIME types as video/webm. Added video/webm as a supported MIME type on the backend associated with the webm extension, though the importer component itself won't allow video/webm files if one is selected to be uploaded the old fashioned way.
Todos:
Enforce a duration limit for audio recordings - probably around 2 minutes? Recordings are currently at a bitrate of 128kb/s, so a 2 minute recording would be ~17mb
Better error handling when the MediaRecorder interfaces fails to initialize or throws an error
Test in different browsers/OS's to ensure the webm MIME type is fully supported
Still WIP.
audio/webm
as an additional supported MIME type.webm
is a media-agnostic container that can handle both audio and video, so the PHP Plupload library we're using is flagging recording MIME types asvideo/webm
. Addedvideo/webm
as a supported MIME type on the backend associated with thewebm
extension, though the importer component itself won't allowvideo/webm
files if one is selected to be uploaded the old fashioned way.Todos:
MediaRecorder
interfaces fails to initialize or throws an errorwebm
MIME type is fully supported