From 942a0512d882e1d9f716c982f88d39eb39f76d9c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 27 Dec 2016 03:07:18 -0500 Subject: [PATCH] update components --- .../emby-webcomponents/.bower.json | 8 +- .../browserdeviceprofile.js | 97 +++++++++++++------ .../emby-webcomponents/sync/syncjobeditor.js | 18 ++-- .../emby-webcomponents/sync/syncjoblist.js | 6 +- 4 files changed, 86 insertions(+), 43 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 3f5d19c914..f15d36ada6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.403", - "_release": "1.4.403", + "version": "1.4.405", + "_release": "1.4.405", "_resolution": { "type": "version", - "tag": "1.4.403", - "commit": "0ff81a5c3db2a4711c14292449fe18ba9d5fd040" + "tag": "1.4.405", + "commit": "6745a06a14f978824ceaf9cebdb07f8bca2677e1" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 609f9505d6..f0765cc53a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -208,33 +208,7 @@ define(['browser'], function (browser) { function getMaxBitrate() { - if (browser.edgeUwp) { - return 40000000; - } - - // 10mbps - if (browser.xboxOne) { - return 10000000; - } - - if (browser.ps4) { - return 8000000; - } - - var userAgent = navigator.userAgent.toLowerCase(); - - if (browser.tizen) { - - // 2015 models - if (userAgent.indexOf('tizen 2.3') !== -1) { - return 20000000; - } - - // 2016 models - return 40000000; - } - - return 100000000; + return 120000000; } return function (options) { @@ -583,6 +557,75 @@ define(['browser'], function (browser) { }); } + var isTizenFhd = false; + var globalMaxVideoBitrate = browser.ps4 ? '8000000' : + (browser.xboxOne ? '10000000' : + (browser.edgeUwp ? '40000000' : + (browser.tizen && isTizenFhd ? '20000000' : ''))); + + var h264MaxVideoBitrate = globalMaxVideoBitrate; + if (browser.tizen && !isTizenFhd) { + + h264MaxVideoBitrate = '60000000'; + } + + if (h264MaxVideoBitrate) { + profile.CodecProfiles[profile.CodecProfiles.length - 1].Conditions.push({ + Condition: 'LessThanEqual', + Property: 'VideoBitrate', + Value: h264MaxVideoBitrate, + IsRequired: true + }); + } + + if (globalMaxVideoBitrate) { + profile.CodecProfiles.push({ + Type: 'Video', + Conditions: [ + { + Condition: 'LessThanEqual', + Property: 'VideoBitrate', + Value: globalMaxVideoBitrate + }] + }); + } + + if (browser.tizen && !isTizenFhd) { + profile.CodecProfiles.push({ + Type: 'Video', + Codec: 'vp9', + Conditions: [ + { + Condition: 'LessThanEqual', + Property: 'VideoBitrate', + Value: '40000000' + } + ] + }); + profile.CodecProfiles.push({ + Type: 'Video', + Codec: 'mpeg4,vc1,mpeg2video,mpeg1video,msmpeg4,h263,vp6,vp8', + Conditions: [ + { + Condition: 'LessThanEqual', + Property: 'VideoBitrate', + Value: '20000000' + } + ] + }); + // All others fall here + profile.CodecProfiles.push({ + Type: 'Video', + Conditions: [ + { + Condition: 'LessThanEqual', + Property: 'VideoBitrate', + Value: '80000000' + } + ] + }); + } + // Subtitle profiles // External vtt or burn in profile.SubtitleProfiles = []; diff --git a/dashboard-ui/bower_components/emby-webcomponents/sync/syncjobeditor.js b/dashboard-ui/bower_components/emby-webcomponents/sync/syncjobeditor.js index 94dfe18d8d..91d5ba2a4d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/sync/syncjobeditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/sync/syncjobeditor.js @@ -30,7 +30,7 @@ html += '
'; - var hasActions = ['Queued', 'Cancelled', 'Failed', 'ReadyToTransfer', 'Transferring', 'Converting', 'Synced'].indexOf(jobItem.Status) != -1; + var hasActions = ['Queued', 'Cancelled', 'Failed', 'ReadyToTransfer', 'Transferring', 'Converting', 'Synced'].indexOf(jobItem.Status) !== -1; var imgUrl; @@ -57,13 +57,13 @@ html += jobItem.ItemName; html += '
'; - if (jobItem.Status == 'Failed') { + if (jobItem.Status === 'Failed') { html += '
'; } else { html += '
'; } html += globalize.translate('sharedcomponents#SyncJobItemStatus' + jobItem.Status); - if (jobItem.Status == 'Synced' && jobItem.IsMarkedForRemoval) { + if (jobItem.Status === 'Synced' && jobItem.IsMarkedForRemoval) { html += '
'; html += globalize.translate('sharedcomponents#RemovingFromDevice'); } @@ -129,29 +129,29 @@ var listItem = parentWithClass(elem, 'listItem'); var jobItemId = listItem.getAttribute('data-itemid'); var status = listItem.getAttribute('data-status'); - var remove = listItem.getAttribute('data-remove').toLowerCase() == 'true'; + var remove = listItem.getAttribute('data-remove').toLowerCase() === 'true'; var menuItems = []; - if (status == 'Failed' || status == 'Cancelled') { + if (status === 'Failed' || status === 'Cancelled') { menuItems.push({ name: globalize.translate('sharedcomponents#Retry'), id: 'retry' }); } - else if (status == 'Queued' || status == 'Transferring' || status == 'Converting' || status == 'ReadyToTransfer') { + else if (status === 'Queued' || status === 'Transferring' || status === 'Converting' || status === 'ReadyToTransfer') { menuItems.push({ name: globalize.translate('sharedcomponents#CancelDownload'), id: 'cancel' }); } - else if (status == 'Synced' && remove) { + else if (status === 'Synced' && remove) { menuItems.push({ name: globalize.translate('sharedcomponents#KeepOnDevice'), id: 'unmarkforremoval' }); } - else if (status == 'Synced') { + else if (status === 'Synced') { menuItems.push({ name: globalize.translate('sharedcomponents#RemoveFromDevice'), id: 'markforremoval' @@ -285,7 +285,7 @@ } var target = editOptions.Targets.filter(function (t) { - return t.Id == job.TargetId; + return t.Id === job.TargetId; })[0]; var targetName = target ? target.Name : ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/sync/syncjoblist.js b/dashboard-ui/bower_components/emby-webcomponents/sync/syncjoblist.js index 31b0c503ea..1b86c4f463 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/sync/syncjoblist.js +++ b/dashboard-ui/bower_components/emby-webcomponents/sync/syncjoblist.js @@ -113,7 +113,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation'); for (var i = 0, length = textLines.length; i < length; i++) { - if (i == 0) { + if (i === 0) { html += '

'; html += textLines[i]; html += '

'; @@ -156,7 +156,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation'); if (showTargetName) { var targetName = job.TargetName || 'Unknown'; - if (targetName != lastTargetName) { + if (targetName !== lastTargetName) { if (lastTargetName) { html += '
'; @@ -263,7 +263,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation'); var menuItems = []; - if (status == 'Cancelled') { + if (status === 'Cancelled') { menuItems.push({ name: globalize.translate('sharedcomponents#Delete'), id: 'delete'