Commit c7acae36 authored by Robert Lyon's avatar Robert Lyon
Browse files

Allowing video/x-ms-asf be a valid .wmv mimetype (Bug 1364609)



The video/x-ms-asf mimetype is valid for .asf, .wmv and .wma files
but as we can't map more than one extension to the same mimetype I've
added a little hack allowing the .wmv and .wma extensions to also
include the video/x-ms-asf mimtype in the list of valid mimetypes.

Change-Id: I706d86c9bc0c5d0c0eb6ab0a09b1f16208557b00
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 39ba5ec0
......@@ -220,6 +220,14 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype {
foreach ($mimetypes as &$m) {
$m = $m->description;
}
// Hack to allow .wmv and .wma files to also use the .asf mimetype as well
// See http://en.wikipedia.org/wiki/Advanced_Systems_Format
if (in_array('wmv', $data)) {
$mimetypes['video/x-ms-asf'] = 'wmv';
}
if (in_array('wma', $data)) {
$mimetypes['video/x-ms-asf'] = 'wma';
}
return $mimetypes;
}
}
......
......@@ -2780,6 +2780,7 @@ class ArtefactTypeVideo extends ArtefactTypeFile {
'quicktime' => 'quicktime',
'sgi_movie' => 'sgi_movie',
'mp4_video' => 'mp4_video',
'asf' => 'wmv',
);
}
return $descriptions;
......@@ -2833,7 +2834,8 @@ class ArtefactTypeAudio extends ArtefactTypeFile {
'ra',
'au',
'aiff',
'm3u'
'm3u',
'asf',
);
}
return $descriptions;
......
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