From f8eb80550a0915cc68ea78bd4ab5403cb0886310 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 16 Oct 2016 13:11:32 -0400 Subject: [PATCH] update recording defaults --- .../actionsheet/actionsheet.css | 3 ++- .../actionsheet/actionsheet.js | 23 +++++++++++++------ .../browserdeviceprofile.js | 3 ++- .../collectioneditor/collectioneditor.js | 2 ++ .../playlisteditor/playlisteditor.js | 2 +- .../registrationservices.js | 5 ++++ .../components/dockedtabs/dockedtabs.css | 10 -------- dashboard-ui/scripts/livetvsuggested.js | 23 +++++++++++++------ dashboard-ui/scripts/mediaplayer.js | 6 ++++- dashboard-ui/scripts/site.js | 4 ++-- 10 files changed, 51 insertions(+), 30 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.css b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.css index 9e075d63e..3c53368bc 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.css +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.css @@ -12,6 +12,7 @@ background-color: #121314; max-width: 90%; max-height: 90%; + color: #eee; } .actionSheetMenuItem:hover { @@ -103,7 +104,7 @@ } .actionsheet-extraSpacing { - font-size: 108%; + font-size: 112%; } .btnCloseActionSheet { diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index 598188182..01b378fc3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -114,7 +114,7 @@ dialogOptions.entryAnimation = options.entryAnimation; dialogOptions.exitAnimation = options.exitAnimation; dialogOptions.entryAnimationDuration = options.entryAnimationDuration || 140; - dialogOptions.exitAnimationDuration = options.exitAnimationDuration || 180; + dialogOptions.exitAnimationDuration = options.exitAnimationDuration || 160; dialogOptions.autoFocus = false; } @@ -301,13 +301,22 @@ dialogHelper.open(dlg); - var pos = options.positionTo && dialogOptions.size !== 'fullscreen' ? getPosition(options, dlg) : null; + // Make sure the above open has completed so that we can query offsetWidth and offsetHeight + // This was needed in safari, but in chrome this is causing the dialog to change position while animating + var setPositions = function () { + var pos = options.positionTo && dialogOptions.size !== 'fullscreen' ? getPosition(options, dlg) : null; - if (pos) { - dlg.style.position = 'fixed'; - dlg.style.margin = 0; - dlg.style.left = pos.left + 'px'; - dlg.style.top = pos.top + 'px'; + if (pos) { + dlg.style.position = 'fixed'; + dlg.style.margin = 0; + dlg.style.left = pos.left + 'px'; + dlg.style.top = pos.top + 'px'; + } + }; + if (browser.safari) { + setTimeout(setPositions, 0); + } else { + setPositions(); } }); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 255027b9c..90a5a1258 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -416,7 +416,8 @@ define(['browser'], function (browser) { VideoCodec: 'h264', Context: 'Streaming', Protocol: 'hls', - MaxAudioChannels: physicalAudioChannels.toString() + MaxAudioChannels: physicalAudioChannels.toString(), + EnableSplittingOnNonKeyFrames: browser.safari ? true : false }); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js index 7f058515c..73b9c8bd3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js @@ -148,8 +148,10 @@ html += '
'; html += '
'; html += '
'; + html += '
'; html += ''; html += '
'; + html += '
'; html += '
'; diff --git a/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js b/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js index d120f4c54..28f3b9fba 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js @@ -140,7 +140,7 @@ html += '
'; html += '
'; - html += '
'; + html += '
'; html += ''; html += '
'; diff --git a/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js b/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js index e449c6186..3a9e1496b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js +++ b/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js @@ -598,6 +598,11 @@ function showPremiereInfo() { + if (appHost.supports('externalpremium')) { + showExternalPremiereInfo(); + return Promise.resolve(); + } + return iapManager.getSubscriptionOptions().then(function (subscriptionOptions) { var dialogOptions = { diff --git a/dashboard-ui/components/dockedtabs/dockedtabs.css b/dashboard-ui/components/dockedtabs/dockedtabs.css index a1195193b..082560457 100644 --- a/dashboard-ui/components/dockedtabs/dockedtabs.css +++ b/dashboard-ui/components/dockedtabs/dockedtabs.css @@ -36,16 +36,6 @@ font-size: 20px; } -.dockedtabs-dlg { - font-size: inherit !important; - background-color: #222 !important; - color: #eee; -} - -.dockedtabs-dlg-menuitem:hover { - background-color: #333 !important; -} - @media all and (max-width: 800px) { .dockedtab-midsize { display: none !important; diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index f9dd1bdfb..b8e79aad7 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -98,7 +98,10 @@ }).then(function (result) { - renderItems(page, result.Items, 'activeProgramItems', 'play'); + renderItems(page, result.Items, 'activeProgramItems', 'play', { + showAirDateTime: false, + showAirEndTime: true + }); Dashboard.hideLoadingMsg(); }); } @@ -151,7 +154,10 @@ }).then(function (result) { - renderItems(page, result.Items, 'upcomingTvMovieItems', null, getPortraitShape()); + renderItems(page, result.Items, 'upcomingTvMovieItems', null, { + shape: getPortraitShape(), + preferThumb: null + }); }); ApiClient.getLiveTvRecommendedPrograms({ @@ -187,15 +193,17 @@ }); } - function renderItems(page, items, sectionClass, overlayButton, shape) { + function renderItems(page, items, sectionClass, overlayButton, cardOptions) { var supportsImageAnalysis = appHost.supports('imageanalysis'); - var html = cardBuilder.getCardsHtml({ + cardOptions = cardOptions || {}; + + var html = cardBuilder.getCardsHtml(Object.assign({ items: items, - preferThumb: !shape, + preferThumb: true, inheritThumb: false, - shape: shape || (enableScrollX() ? 'overflowBackdrop' : 'backdrop'), + shape: (enableScrollX() ? 'overflowBackdrop' : 'backdrop'), showParentTitleOrTitle: true, showTitle: false, centerText: !supportsImageAnalysis, @@ -210,7 +218,8 @@ showChannelName: true, vibrant: true, cardLayout: supportsImageAnalysis - }); + + }, cardOptions)); var elem = page.querySelector('.' + sectionClass); diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 7379310b4..5d95441d4 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -157,7 +157,11 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS if (!AppInfo.isNativeApp) { options.enableMkvProgressive = item.RunTimeTicks != null; - options.enableHls = !browserInfo.firefox || item.RunTimeTicks == null; + + if (item.RunTimeTicks == null) { + options.enableHls = true; + } + options.disableVideoAudioCodecs = disableVideoAudioCodecs; } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index a2060abce..d46a5440a 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1614,8 +1614,8 @@ var AppInfo = {}; var embyWebComponentsBowerPath = bowerPath + '/emby-webcomponents'; - if (Dashboard.isRunningInCordova() && browser.safari) { - paths.actionsheet = "cordova/actionsheet"; + if (Dashboard.isRunningInCordova()) { + define("actionsheet", ["cordova/actionsheet"], returnFirstDependency); } else { define("actionsheet", ["webActionSheet"], returnFirstDependency); }