mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 1214462: P7. Do not assume having ffmpeg enabled provides h264 or mp3 decoding. r=cpearce
FFmpeg on Windows or Mac only provides VP9 and VP8 decoding
This commit is contained in:
parent
9f898cf704
commit
7655017a96
@ -112,6 +112,10 @@ function IsMacOSSnowLeopardOrLater() {
|
||||
return major == 10 && minor >= 6;
|
||||
}
|
||||
|
||||
function IsLinux() {
|
||||
return navigator.userAgent.indexOf("Linux") != -1;
|
||||
}
|
||||
|
||||
function getPref(name) {
|
||||
var pref = false;
|
||||
try {
|
||||
@ -128,14 +132,14 @@ var haveMp4 = (getPref("media.wmf.enabled") && IsWindowsVistaOrLater()) ||
|
||||
IsMacOSSnowLeopardOrLater() ||
|
||||
IsJellyBeanOrLater() ||
|
||||
getPref("media.omx.enabled") ||
|
||||
getPref("media.ffmpeg.enabled");
|
||||
(IsLinux() && getPref("media.ffmpeg.enabled"));
|
||||
|
||||
check_mp4(document.getElementById('v'), haveMp4);
|
||||
|
||||
var haveMp3 = getPref("media.directshow.enabled") ||
|
||||
(getPref("media.wmf.enabled") && IsWindowsVistaOrLater()) ||
|
||||
(IsJellyBeanOrLater() && getPref("media.android-media-codec.enabled")) ||
|
||||
getPref("media.ffmpeg.enabled") ||
|
||||
(IsLinux() && getPref("media.ffmpeg.enabled")) ||
|
||||
getPref("media.apple.mp3.enabled");
|
||||
check_mp3(document.getElementById('v'), haveMp3);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user