Skip to content

Commit

Permalink
MDL-48093 HTML 5 video: Firefox now supports .mp4
Browse files Browse the repository at this point in the history
  • Loading branch information
sammarshallou committed Nov 10, 2014
1 parent 803ddf9 commit fc7a247
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions lib/medialib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,11 @@ public function list_supported_urls(array $urls, array $options = array()) {
continue;
}
} else {
// Formats .m4v and .mp4 are not supported in Firefox or Opera.
if (core_useragent::is_firefox() || core_useragent::is_opera()) {
// Formats .m4v and .mp4 are not supported in Opera, or in Firefox before 27.
// https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
// has the details.
if (core_useragent::is_opera() || (core_useragent::is_firefox() &&
!core_useragent::check_firefox_version(27))) {
continue;
}
}
Expand Down Expand Up @@ -1140,8 +1143,15 @@ public function list_supported_urls(array $urls, array $options = array()) {
continue;
}
} else {
// Formats .aac, .mp3, and .m4a are not supported in Firefox or Opera.
if (core_useragent::is_firefox() || core_useragent::is_opera()) {
// Formats .aac, .mp3, and .m4a are not supported in Opera.
if (core_useragent::is_opera()) {
continue;
}
// Formats .mp3 and .m4a were not reliably supported in Firefox before 27.
// https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
// has the details. .aac is still not supported.
if (core_useragent::is_firefox() && ($ext === 'aac' ||
!core_useragent::check_firefox_version(27))) {
continue;
}
}
Expand Down

0 comments on commit fc7a247

Please sign in to comment.