update components

This commit is contained in:
Luke Pulverenti 2016-12-27 03:07:18 -05:00
parent a5d05d68fe
commit 942a0512d8
4 changed files with 86 additions and 43 deletions

View File

@ -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",

View File

@ -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 = [];

View File

@ -30,7 +30,7 @@
html += '<div class="listItem" data-itemid="' + jobItem.Id + '" data-status="' + jobItem.Status + '" data-remove="' + jobItem.IsMarkedForRemoval + '">';
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 += '</div>';
if (jobItem.Status == 'Failed') {
if (jobItem.Status === 'Failed') {
html += '<div class="secondary" style="color:red;">';
} else {
html += '<div class="secondary">';
}
html += globalize.translate('sharedcomponents#SyncJobItemStatus' + jobItem.Status);
if (jobItem.Status == 'Synced' && jobItem.IsMarkedForRemoval) {
if (jobItem.Status === 'Synced' && jobItem.IsMarkedForRemoval) {
html += '<br/>';
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 : '';

View File

@ -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 += '<h3 class="listItemBodyText">';
html += textLines[i];
html += '</h3>';
@ -156,7 +156,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
if (showTargetName) {
var targetName = job.TargetName || 'Unknown';
if (targetName != lastTargetName) {
if (targetName !== lastTargetName) {
if (lastTargetName) {
html += '</div>';
@ -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'