From 30015609f71091c866747649948fb68386c09389 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 21:26:51 -0500 Subject: [PATCH 1/3] fix edge playback --- .../emby-webcomponents/.bower.json | 8 ++++---- .../emby-webcomponents/browser.js | 16 ++++++++++------ .../emby-webcomponents/browserdeviceprofile.js | 11 ++++++++++- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index abce071a6a..484d9012ea 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -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", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browser.js b/dashboard-ui/bower_components/emby-webcomponents/browser.js index 3194e5e182..359a484223 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browser.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browser.js @@ -20,13 +20,17 @@ var browser = match[1] || ""; - if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -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 - browser = "msie"; - } - 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"; + // http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update + browser = "msie"; + } + 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') { diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 535f2023f3..8eee7ee7c1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -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' From cd2253bdeacd354fa8bfbfee5f4b3b0d94fa30c6 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Feb 2016 23:47:35 -0500 Subject: [PATCH 2/3] auto-queue episodes --- dashboard-ui/scripts/mediaplayer.js | 33 ++++++++++++++++++++++++++--- dashboard-ui/scripts/site.js | 2 +- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 7ebe1e4d89..8078b4dd6d 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -469,7 +469,7 @@ return self.currentItem && self.currentItem.MediaType == mediaType; }; - function translateItemsForPlayback(items) { + function translateItemsForPlayback(items, smart) { var firstItem = items[0]; var promise; @@ -511,6 +511,33 @@ MediaTypes: "Audio,Video" }); } + else if (smart && firstItem.Type == "Episode" && items.length == 1) { + + promise = ApiClient.getEpisodes(firstItem.SeriesId, { + IsVirtualUnaired: false, + IsMissing: false, + UserId: ApiClient.getCurrentUserId(), + Fields: getItemFields + + }).then(function (episodesResult) { + + var foundItem = false; + episodesResult.Items = episodesResult.Items.filter(function (e) { + + if (foundItem) { + return true; + } + if (e.Id == firstItem.Id) { + foundItem = true; + return true; + } + + return false; + }); + episodesResult.TotalRecordCount = episodesResult.Items.length; + return episodesResult; + }); + } if (promise) { return new Promise(function (resolve, reject) { @@ -537,7 +564,7 @@ if (options.items) { - translateItemsForPlayback(options.items).then(function (items) { + translateItemsForPlayback(options.items, true).then(function (items) { self.playWithIntros(items, options, user); }); @@ -550,7 +577,7 @@ }).then(function (result) { - translateItemsForPlayback(result.Items).then(function (items) { + translateItemsForPlayback(result.Items, true).then(function (items) { self.playWithIntros(items, options, user); }); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index fc523621b5..d85bbed325 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1826,7 +1826,7 @@ var AppInfo = {}; // Put the version into the bower path since we can't easily put a query string param on html imports // Emby server will handle this if (!Dashboard.isRunningInCordova()) { - bowerPath += window.dashboardVersion; + //bowerPath += window.dashboardVersion; } return bowerPath; From d50ec10bdea665517096610a12579a4290919c07 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 14 Feb 2016 00:23:33 -0500 Subject: [PATCH 3/3] restore people in search --- dashboard-ui/scripts/librarybrowser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 0bad35c621..43d3c0d352 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -2215,7 +2215,7 @@ // cardContent html += ''; - if (options.overlayPlayButton && !item.IsPlaceHolder && (item.LocationType != 'Virtual' || !item.MediaType || item.Type == 'Program')) { + if (options.overlayPlayButton && !item.IsPlaceHolder && (item.LocationType != 'Virtual' || !item.MediaType || item.Type == 'Program') && item.Type != 'Person') { html += '
'; } if (options.overlayMoreButton) {