Commit 3148eb5b authored by paalj's avatar paalj

Update PHP libs

parent 25eb1e84
......@@ -90,7 +90,7 @@ abstract class H5PMetadata {
$exists = array_key_exists($key, $metadata);
// Don't include missing fields
if (!$include_missing && !exists) {
if (!$include_missing && !$exists) {
continue;
}
......
......@@ -13,3 +13,8 @@ var H5P = window.H5P = window.H5P || {};
* @member
*/
H5P.jQuery = jQuery.noConflict(true);
H5P.jQuery.ajaxPrefilter(function (s) {
if (s.crossDomain) {
s.contents.script = false;
}
});
......@@ -167,6 +167,7 @@ class H5peditorFile {
$allowed = array(
'audio/mpeg' => 'mp3',
'audio/mp3' => 'mp3',
'audio/mp4' => 'm4a',
'audio/x-wav' => 'wav',
'audio/wav' => 'wav',
//'application/ogg' => 'ogg',
......@@ -176,6 +177,7 @@ class H5peditorFile {
if (!$this->check($allowed)) {
$this->result->error = $this->interface->t('Invalid audio file format. Use mp3 or wav.');
return FALSE;
}
$this->result->mime = $this->type;
......
......@@ -256,7 +256,7 @@ H5PEditor.FileUploader = (function ($, EventDispatcher) {
mimes = 'image/jpeg,image/png,image/gif';
}
else if (field.type === 'audio') {
mimes = 'audio/mpeg,audio/x-wav,audio/ogg';
mimes = 'audio/mpeg,audio/x-wav,audio/ogg,audio/mp4';
}
else if (field.type === 'video') {
mimes = 'video/mp4,video/webm,video/ogg';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment