1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update h264 detection

This commit is contained in:
Luke Pulverenti 2016-01-04 16:13:33 -05:00
parent 1b28b0c33d
commit 295982f18c

View file

@ -1789,16 +1789,8 @@
}
function canPlayH264() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('firefox') != -1) {
if (userAgent.indexOf('windows') != -1) {
return true;
}
return false;
}
return true;
var v = document.createElement('video');
return !!(v.canPlayType && v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/, ''));
}
var supportedFormats;
@ -1818,13 +1810,7 @@
list.push('ac3');
}
var canPlayH264 = true;
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('firefox') != -1 && userAgent.indexOf('windows') == -1) {
canPlayH264 = false;
}
if (canPlayH264) {
if (canPlayH264()) {
list.push('h264');
}