1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.4.403", "version": "1.4.405",
"_release": "1.4.403", "_release": "1.4.405",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.4.403", "tag": "1.4.405",
"commit": "0ff81a5c3db2a4711c14292449fe18ba9d5fd040" "commit": "6745a06a14f978824ceaf9cebdb07f8bca2677e1"
}, },
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1", "_target": "^1.2.1",

View file

@ -208,33 +208,7 @@ define(['browser'], function (browser) {
function getMaxBitrate() { function getMaxBitrate() {
if (browser.edgeUwp) { return 120000000;
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 function (options) { 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 // Subtitle profiles
// External vtt or burn in // External vtt or burn in
profile.SubtitleProfiles = []; profile.SubtitleProfiles = [];

View file

@ -30,7 +30,7 @@
html += '<div class="listItem" data-itemid="' + jobItem.Id + '" data-status="' + jobItem.Status + '" data-remove="' + jobItem.IsMarkedForRemoval + '">'; 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; var imgUrl;
@ -57,13 +57,13 @@
html += jobItem.ItemName; html += jobItem.ItemName;
html += '</div>'; html += '</div>';
if (jobItem.Status == 'Failed') { if (jobItem.Status === 'Failed') {
html += '<div class="secondary" style="color:red;">'; html += '<div class="secondary" style="color:red;">';
} else { } else {
html += '<div class="secondary">'; html += '<div class="secondary">';
} }
html += globalize.translate('sharedcomponents#SyncJobItemStatus' + jobItem.Status); html += globalize.translate('sharedcomponents#SyncJobItemStatus' + jobItem.Status);
if (jobItem.Status == 'Synced' && jobItem.IsMarkedForRemoval) { if (jobItem.Status === 'Synced' && jobItem.IsMarkedForRemoval) {
html += '<br/>'; html += '<br/>';
html += globalize.translate('sharedcomponents#RemovingFromDevice'); html += globalize.translate('sharedcomponents#RemovingFromDevice');
} }
@ -129,29 +129,29 @@
var listItem = parentWithClass(elem, 'listItem'); var listItem = parentWithClass(elem, 'listItem');
var jobItemId = listItem.getAttribute('data-itemid'); var jobItemId = listItem.getAttribute('data-itemid');
var status = listItem.getAttribute('data-status'); var status = listItem.getAttribute('data-status');
var remove = listItem.getAttribute('data-remove').toLowerCase() == 'true'; var remove = listItem.getAttribute('data-remove').toLowerCase() === 'true';
var menuItems = []; var menuItems = [];
if (status == 'Failed' || status == 'Cancelled') { if (status === 'Failed' || status === 'Cancelled') {
menuItems.push({ menuItems.push({
name: globalize.translate('sharedcomponents#Retry'), name: globalize.translate('sharedcomponents#Retry'),
id: '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({ menuItems.push({
name: globalize.translate('sharedcomponents#CancelDownload'), name: globalize.translate('sharedcomponents#CancelDownload'),
id: 'cancel' id: 'cancel'
}); });
} }
else if (status == 'Synced' && remove) { else if (status === 'Synced' && remove) {
menuItems.push({ menuItems.push({
name: globalize.translate('sharedcomponents#KeepOnDevice'), name: globalize.translate('sharedcomponents#KeepOnDevice'),
id: 'unmarkforremoval' id: 'unmarkforremoval'
}); });
} }
else if (status == 'Synced') { else if (status === 'Synced') {
menuItems.push({ menuItems.push({
name: globalize.translate('sharedcomponents#RemoveFromDevice'), name: globalize.translate('sharedcomponents#RemoveFromDevice'),
id: 'markforremoval' id: 'markforremoval'
@ -285,7 +285,7 @@
} }
var target = editOptions.Targets.filter(function (t) { var target = editOptions.Targets.filter(function (t) {
return t.Id == job.TargetId; return t.Id === job.TargetId;
})[0]; })[0];
var targetName = target ? target.Name : ''; 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++) { for (var i = 0, length = textLines.length; i < length; i++) {
if (i == 0) { if (i === 0) {
html += '<h3 class="listItemBodyText">'; html += '<h3 class="listItemBodyText">';
html += textLines[i]; html += textLines[i];
html += '</h3>'; html += '</h3>';
@ -156,7 +156,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
if (showTargetName) { if (showTargetName) {
var targetName = job.TargetName || 'Unknown'; var targetName = job.TargetName || 'Unknown';
if (targetName != lastTargetName) { if (targetName !== lastTargetName) {
if (lastTargetName) { if (lastTargetName) {
html += '</div>'; html += '</div>';
@ -263,7 +263,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
var menuItems = []; var menuItems = [];
if (status == 'Cancelled') { if (status === 'Cancelled') {
menuItems.push({ menuItems.push({
name: globalize.translate('sharedcomponents#Delete'), name: globalize.translate('sharedcomponents#Delete'),
id: 'delete' id: 'delete'