mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
adjust external player label
This commit is contained in:
parent
f19a485f12
commit
670d654af8
9 changed files with 64 additions and 33 deletions
|
@ -51,6 +51,10 @@
|
|||
margin: 8px;
|
||||
}
|
||||
|
||||
.mediumCardMargin .cardBox {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
/*@media all and (max-width: 600px) {
|
||||
|
||||
.cardBox {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
<div class="channelPaging"></div>
|
||||
</div>
|
||||
<div class="guideRequiresUnlock readOnlyContent" style="margin:2em auto;text-align:center;display:none;">
|
||||
<div class="guideRequiresUnlock readOnlyContent" style="margin:1em auto;text-align:center;display:none;padding:1em;">
|
||||
<p class="unlockText"></p>
|
||||
<button class="btn btnActionAccent btnUnlockGuide" data-role="none" type="button">
|
||||
<span>
|
||||
|
|
|
@ -178,7 +178,8 @@
|
|||
<input type="checkbox" id="chkExternalVideoPlayer" />
|
||||
<label for="chkExternalVideoPlayer">${OptionEnableExternalVideoPlayers}</label>
|
||||
</fieldset>
|
||||
<div style="padding: 0 2px;">${LabelExternalPlayersHelp}</div>
|
||||
<div style="padding: 0 2px;display:none;" class="labelGenericExternalPlayers">${LabelExternalPlayersHelp}</div>
|
||||
<div style="padding: 0 2px;display:none;" class="labelNativeExternalPlayers">${LabelNativeExternalPlayersHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -784,6 +784,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (AppSettings.enableItemPreviews()) {
|
||||
showItemsOverlay({
|
||||
ids: [itemId],
|
||||
context: context
|
||||
|
@ -791,6 +792,7 @@
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.createCardMenus = function (options) {
|
||||
|
||||
|
|
|
@ -1109,7 +1109,7 @@
|
|||
|
||||
// Can't autoplay in these browsers so we need to use the full controls
|
||||
if (requiresNativeControls) {
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay" crossorigin="anonymous" controls="controls"' + posterCode + '>';
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay" crossorigin="anonymous" controls="controls"' + posterCode + ' webkit-playsinline>';
|
||||
}
|
||||
else {
|
||||
|
||||
|
|
|
@ -61,11 +61,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#webClientPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
}).on('pagebeforeshow', "#webClientPreferencesPage", function () {
|
||||
$(document).on('pageshowready', "#webClientPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -86,6 +82,14 @@
|
|||
} else {
|
||||
$('.homePageConfigurationSection', page).show();
|
||||
}
|
||||
|
||||
if (AppInfo.hasKnownExternalPlayerSupport) {
|
||||
$('.labelNativeExternalPlayers', page).show();
|
||||
$('.labelGenericExternalPlayers', page).hide();
|
||||
} else {
|
||||
$('.labelGenericExternalPlayers', page).show();
|
||||
$('.labelNativeExternalPlayers', page).hide();
|
||||
}
|
||||
});
|
||||
|
||||
window.WebClientPreferencesPage = {
|
||||
|
@ -121,6 +125,14 @@
|
|||
}
|
||||
|
||||
return store.getItem('externalplayers') == 'true';
|
||||
},
|
||||
enableItemPreviews: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
store.setItem('enableItemPreviews', val.toString());
|
||||
}
|
||||
|
||||
return store.getItem('enableItemPreviews') != 'false';
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -1386,7 +1386,7 @@ var Dashboard = {
|
|||
// The native app can handle a little bit more than safari
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
|
||||
quality -= 15;
|
||||
quality -= 20;
|
||||
|
||||
if (isBackdrop) {
|
||||
quality -= 20;
|
||||
|
@ -1549,12 +1549,13 @@ var AppInfo = {};
|
|||
|
||||
if (isCordova) {
|
||||
AppInfo.enableBottomTabs = true;
|
||||
AppInfo.cardMargin = 'mediumCardMargin';
|
||||
} else {
|
||||
AppInfo.enableDetailPageChapters = false;
|
||||
AppInfo.enableDetailsMenuImages = false;
|
||||
AppInfo.enableHeaderImages = false;
|
||||
AppInfo.enableMovieHomeSuggestions = false;
|
||||
AppInfo.enableLargeCardMargin = true;
|
||||
AppInfo.cardMargin = 'largeCardMargin';
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1577,6 +1578,7 @@ var AppInfo = {};
|
|||
|
||||
if (isCordova) {
|
||||
AppInfo.enableAppLayouts = true;
|
||||
AppInfo.hasKnownExternalPlayerSupport = true;
|
||||
}
|
||||
else {
|
||||
AppInfo.enableFooterNotifications = true;
|
||||
|
@ -1670,8 +1672,8 @@ var AppInfo = {};
|
|||
initFastClick();
|
||||
}
|
||||
|
||||
if (AppInfo.enableLargeCardMargin) {
|
||||
$(document.body).addClass('largeCardMargin');
|
||||
if (AppInfo.cardMargin) {
|
||||
$(document.body).addClass(AppInfo.cardMargin);
|
||||
}
|
||||
|
||||
if (!AppInfo.enableLatestChannelItems) {
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
$('.btnSignInSupporter', elem).on('click', function () {
|
||||
|
||||
Dashboard.alert({
|
||||
message: 'MessagePleaseSignInLocalNetwork',
|
||||
message: Globalize.translate('MessagePleaseSignInLocalNetwork'),
|
||||
callback: function () {
|
||||
cancelInAppPurchase();
|
||||
Dashboard.logout();
|
||||
|
|
|
@ -23,6 +23,15 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
function closeSocket(socketId) {
|
||||
|
||||
try {
|
||||
chrome.sockets.udp.close(socketId);
|
||||
} catch (err) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function findServersInternal(timeoutMs) {
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
@ -54,7 +63,7 @@
|
|||
|
||||
if (socketId) {
|
||||
chrome.sockets.udp.onReceive.removeListener(onReceive);
|
||||
chrome.sockets.udp.close(socketId);
|
||||
closeSocket(socketId);
|
||||
}
|
||||
|
||||
}, timeoutMs);
|
||||
|
@ -62,13 +71,13 @@
|
|||
|
||||
function onReceive(info) {
|
||||
|
||||
try {
|
||||
|
||||
console.log('ServerDiscovery message received');
|
||||
|
||||
console.log(info);
|
||||
|
||||
if (info.socketId == socketId) {
|
||||
|
||||
try {
|
||||
if (info != null && info.socketId == socketId) {
|
||||
var json = arrayBufferToString(info.data);
|
||||
console.log('Server discovery json: ' + json);
|
||||
var server = JSON.parse(json);
|
||||
|
@ -80,11 +89,12 @@
|
|||
}
|
||||
|
||||
servers.push(server);
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
console.log('Error receiving server info: ' + err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var port = 7359;
|
||||
console.log('chrome.sockets.udp.create');
|
||||
|
@ -105,24 +115,24 @@
|
|||
|
||||
console.log('chrome.sockets.udp.bind');
|
||||
|
||||
chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 0, function (result) {
|
||||
chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 0, function (bindResult) {
|
||||
|
||||
if (getResultCode(result) != 0) {
|
||||
console.log('bind fail: ' + result);
|
||||
if (getResultCode(bindResult) != 0) {
|
||||
console.log('bind fail: ' + bindResult);
|
||||
deferred.resolveWith(null, [servers]);
|
||||
chrome.sockets.udp.close(createInfo.socketId);
|
||||
closeSocket(createInfo.socketId);
|
||||
return;
|
||||
}
|
||||
|
||||
var data = stringToArrayBuffer('who is EmbyServer?');
|
||||
|
||||
console.log('chrome.sockets.udp.send');
|
||||
chrome.sockets.udp.send(createInfo.socketId, data, '255.255.255.255', port, function (result) {
|
||||
chrome.sockets.udp.send(createInfo.socketId, data, '255.255.255.255', port, function (sendResult) {
|
||||
|
||||
if (getResultCode(result) != 0) {
|
||||
console.log('send fail: ' + result);
|
||||
if (getResultCode(sendResult) != 0) {
|
||||
console.log('send fail: ' + sendResult);
|
||||
deferred.resolveWith(null, [servers]);
|
||||
chrome.sockets.udp.close(createInfo.socketId);
|
||||
closeSocket(createInfo.socketId);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue