mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
770e331a9f
commit
4081cf3e85
31 changed files with 539 additions and 288 deletions
|
@ -1,5 +1,10 @@
|
|||
define(['browser'], function (browser) {
|
||||
|
||||
function canPlayH264() {
|
||||
var v = document.createElement('video');
|
||||
return !!(v.canPlayType && v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/, ''));
|
||||
}
|
||||
|
||||
var supportedFormats;
|
||||
function getSupportedFormats() {
|
||||
|
||||
|
@ -20,13 +25,7 @@
|
|||
list.push('mkv');
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue