mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix edge playback
This commit is contained in:
parent
a541bf1ce0
commit
30015609f7
3 changed files with 24 additions and 11 deletions
|
@ -15,12 +15,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.0.74",
|
||||
"_release": "1.0.74",
|
||||
"version": "1.0.76",
|
||||
"_release": "1.0.76",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.0.74",
|
||||
"commit": "74afb337ff5f0ee41b75ba5ddb5dea5ec9c20a66"
|
||||
"tag": "1.0.76",
|
||||
"commit": "8b29590144a9a67065820c7c1a6a4f433f52d9bf"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "~1.0.0",
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
|
||||
var browser = match[1] || "";
|
||||
|
||||
if (browser == "edge") {
|
||||
platform_match = [""];
|
||||
} else {
|
||||
if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -1) {
|
||||
|
||||
// http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update
|
||||
|
@ -28,6 +31,7 @@
|
|||
else if (ua.indexOf("like gecko") != -1 && ua.indexOf('webkit') == -1 && ua.indexOf('opera') == -1 && ua.indexOf('chrome') == -1 && ua.indexOf('safari') == -1) {
|
||||
browser = "msie";
|
||||
}
|
||||
}
|
||||
|
||||
if (browser == 'opr') {
|
||||
browser = 'opera';
|
||||
|
|
|
@ -103,6 +103,7 @@ define(['browser'], function (browser) {
|
|||
profile.DirectPlayProfiles = [];
|
||||
|
||||
var videoAudioCodecs = [];
|
||||
var hlsVideoAudioCodecs = [];
|
||||
|
||||
var supportsMp3VideoAudio = videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/, '') ||
|
||||
videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/, '');
|
||||
|
@ -113,19 +114,27 @@ define(['browser'], function (browser) {
|
|||
// safari is lying
|
||||
if (!browser.safari) {
|
||||
videoAudioCodecs.push('ac3');
|
||||
|
||||
// This works in edge desktop, but not mobile
|
||||
if (!browser.edge || !browser.mobile) {
|
||||
hlsVideoAudioCodecs.push('ac3');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (canPlayMkv) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
hlsVideoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/, '')) {
|
||||
videoAudioCodecs.push('aac');
|
||||
hlsVideoAudioCodecs.push('aac');
|
||||
}
|
||||
if (!canPlayMkv) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
hlsVideoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +206,7 @@ define(['browser'], function (browser) {
|
|||
profile.TranscodingProfiles.push({
|
||||
Container: 'ts',
|
||||
Type: 'Video',
|
||||
AudioCodec: videoAudioCodecs.join(','),
|
||||
AudioCodec: hlsVideoAudioCodecs.join(','),
|
||||
VideoCodec: 'h264',
|
||||
Context: 'Streaming',
|
||||
Protocol: 'hls'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue