mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update video osd
This commit is contained in:
parent
b2bab22271
commit
ba2ccfb17a
13 changed files with 54 additions and 80 deletions
|
@ -14,12 +14,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.471",
|
"version": "1.4.473",
|
||||||
"_release": "1.4.471",
|
"_release": "1.4.473",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.471",
|
"tag": "1.4.473",
|
||||||
"commit": "8b98518723cdf21d7b4a955f95d8c8e154b39e19"
|
"commit": "5480407d7cc7201e3310cb892c5d2779507d7240"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
|
|
@ -753,9 +753,11 @@
|
||||||
options: {},
|
options: {},
|
||||||
command: 'Mute'
|
command: 'Mute'
|
||||||
});
|
});
|
||||||
//castPlayer.setMute(true);
|
|
||||||
} else {
|
} else {
|
||||||
self.setVolume(self.getVolume() + 2);
|
castPlayer.sendMessage({
|
||||||
|
options: {},
|
||||||
|
command: 'Unmute'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -776,11 +778,10 @@
|
||||||
|
|
||||||
self.toggleMute = function () {
|
self.toggleMute = function () {
|
||||||
|
|
||||||
if (self.isMuted()) {
|
castPlayer.sendMessage({
|
||||||
self.setMute(false);
|
options: {},
|
||||||
} else {
|
command: 'ToggleMute'
|
||||||
self.setMute(true);
|
});
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getTargets = function () {
|
self.getTargets = function () {
|
||||||
|
|
|
@ -896,6 +896,8 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
||||||
|
|
||||||
self.seek = function (ticks, player) {
|
self.seek = function (ticks, player) {
|
||||||
|
|
||||||
|
ticks = Math.max(0, ticks);
|
||||||
|
|
||||||
player = player || currentPlayer;
|
player = player || currentPlayer;
|
||||||
if (player && !enableLocalPlaylistManagement(player)) {
|
if (player && !enableLocalPlaylistManagement(player)) {
|
||||||
return player.seek(ticks);
|
return player.seek(ticks);
|
||||||
|
@ -960,15 +962,10 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
||||||
// Go back 15 seconds
|
// Go back 15 seconds
|
||||||
ticks += userSettings.skipForwardLength() * 10000;
|
ticks += userSettings.skipForwardLength() * 10000;
|
||||||
|
|
||||||
var data = getPlayerData(player).streamInfo;
|
var runTimeTicks = self.duration(player) || 0;
|
||||||
var mediaSource = data.mediaSource;
|
|
||||||
|
|
||||||
if (mediaSource) {
|
if (ticks < runTimeTicks) {
|
||||||
var runTimeTicks = mediaSource.RunTimeTicks || 0;
|
self.seek(ticks);
|
||||||
|
|
||||||
if (ticks < runTimeTicks) {
|
|
||||||
self.seek(ticks);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
var currentDisplayingProductInfos = [];
|
var currentDisplayingProductInfos = [];
|
||||||
var currentDisplayingResolve = null;
|
var currentDisplayingResolve = null;
|
||||||
var currentDisplayingResolveResult = {};
|
|
||||||
|
|
||||||
function alertText(options) {
|
function alertText(options) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
@ -22,7 +21,6 @@
|
||||||
showInAppPurchaseElement(subscriptionOptions, unlockableProductInfo, dialogOptions, resolve, reject);
|
showInAppPurchaseElement(subscriptionOptions, unlockableProductInfo, dialogOptions, resolve, reject);
|
||||||
|
|
||||||
currentDisplayingResolve = resolve;
|
currentDisplayingResolve = resolve;
|
||||||
currentDisplayingResolveResult = {};
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -69,7 +67,7 @@
|
||||||
|
|
||||||
html += '<button is="emby-button" type="button" class="raised button-submit block btnGetPremiere block formDialogFooterItem" autoFocus><span>' + globalize.translate('sharedcomponents#HeaderBecomeProjectSupporter') + '</span></button>';
|
html += '<button is="emby-button" type="button" class="raised button-submit block btnGetPremiere block formDialogFooterItem" autoFocus><span>' + globalize.translate('sharedcomponents#HeaderBecomeProjectSupporter') + '</span></button>';
|
||||||
|
|
||||||
var seconds = 12;
|
var seconds = 16;
|
||||||
|
|
||||||
html += '<div class="continueTimeText formDialogFooterItem" style="margin: 1.5em 0 .5em;">' + globalize.translate('sharedcomponents#ContinueInSecondsValue', seconds) + '</div>';
|
html += '<div class="continueTimeText formDialogFooterItem" style="margin: 1.5em 0 .5em;">' + globalize.translate('sharedcomponents#ContinueInSecondsValue', seconds) + '</div>';
|
||||||
|
|
||||||
|
@ -155,14 +153,14 @@
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
var settingsKey = 'periodicmessage10-' + feature;
|
var settingsKey = 'periodicmessage11-' + feature;
|
||||||
|
|
||||||
var lastMessage = parseInt(appSettings.get(settingsKey) || '0');
|
var lastMessage = parseInt(appSettings.get(settingsKey) || '0');
|
||||||
|
|
||||||
if (!lastMessage) {
|
if (!lastMessage) {
|
||||||
|
|
||||||
// Don't show on the very first playback attempt
|
// Don't show on the very first playback attempt
|
||||||
appSettings.set(settingsKey, new Date().getTime() - intervalMs);
|
appSettings.set(settingsKey, new Date().getTime() - (intervalMs / 2));
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +261,6 @@
|
||||||
function clearCurrentDisplayingInfo() {
|
function clearCurrentDisplayingInfo() {
|
||||||
currentDisplayingProductInfos = [];
|
currentDisplayingProductInfos = [];
|
||||||
currentDisplayingResolve = null;
|
currentDisplayingResolve = null;
|
||||||
currentDisplayingResolveResult = {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showExternalPremiereInfo() {
|
function showExternalPremiereInfo() {
|
||||||
|
@ -382,11 +379,14 @@
|
||||||
btnPurchases[i].addEventListener('click', showExternalPremiereInfo);
|
btnPurchases[i].addEventListener('click', showExternalPremiereInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var rejected = false;
|
||||||
|
var resolveWithTimeLimit = false;
|
||||||
|
|
||||||
var btnPlayMinute = dlg.querySelector('.btnPlayMinute');
|
var btnPlayMinute = dlg.querySelector('.btnPlayMinute');
|
||||||
if (btnPlayMinute) {
|
if (btnPlayMinute) {
|
||||||
btnPlayMinute.addEventListener('click', function () {
|
btnPlayMinute.addEventListener('click', function () {
|
||||||
|
|
||||||
currentDisplayingResolveResult.enableTimeLimit = true;
|
resolveWithTimeLimit = true;
|
||||||
dialogHelper.close(dlg);
|
dialogHelper.close(dlg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -397,8 +397,6 @@
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
var rejected = false;
|
|
||||||
|
|
||||||
function onCloseButtonClick() {
|
function onCloseButtonClick() {
|
||||||
|
|
||||||
rejected = true;
|
rejected = true;
|
||||||
|
@ -424,6 +422,10 @@
|
||||||
clearCurrentDisplayingInfo();
|
clearCurrentDisplayingInfo();
|
||||||
if (rejected) {
|
if (rejected) {
|
||||||
reject();
|
reject();
|
||||||
|
} else if (resolveWithTimeLimit) {
|
||||||
|
resolve({
|
||||||
|
enableTimeLimit: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -639,7 +641,7 @@
|
||||||
}).length) {
|
}).length) {
|
||||||
|
|
||||||
cancelInAppPurchase();
|
cancelInAppPurchase();
|
||||||
resolve(currentDisplayingResolveResult);
|
resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'scrollStyles'], func
|
||||||
// transform is the only way to guarantee animation
|
// transform is the only way to guarantee animation
|
||||||
options.enableNativeScroll = false;
|
options.enableNativeScroll = false;
|
||||||
}
|
}
|
||||||
else if (layoutManager.desktop || !browser.animate) {
|
else if (!layoutManager.tv || !browser.animate) {
|
||||||
|
|
||||||
options.enableNativeScroll = true;
|
options.enableNativeScroll = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
define(['apphost', 'globalize', 'connectionManager', 'layoutManager', 'shell', 'focusManager', 'scrollHelper', 'appSettings', 'paper-icon-button-light', 'formDialogStyle'], function (appHost, globalize, connectionManager, layoutManager, shell, focusManager, scrollHelper, appSettings) {
|
define(['apphost', 'globalize', 'connectionManager', 'layoutManager', 'shell', 'focusManager', 'scrollHelper', 'appSettings', 'registrationServices', 'dialogHelper', 'paper-icon-button-light', 'formDialogStyle'], function (appHost, globalize, connectionManager, layoutManager, shell, focusManager, scrollHelper, appSettings, registrationServices, dialogHelper) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var currentDialogOptions;
|
var currentDialogOptions;
|
||||||
|
|
||||||
function submitJob(dlg, apiClient, userId, syncOptions, form, dialogHelper) {
|
function submitJob(dlg, apiClient, userId, syncOptions, form) {
|
||||||
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw new Error('userId cannot be null');
|
throw new Error('userId cannot be null');
|
||||||
|
@ -313,15 +313,8 @@
|
||||||
|
|
||||||
function showSyncMenu(options) {
|
function showSyncMenu(options) {
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return registrationServices.validateFeature('sync').then(function () {
|
||||||
|
return showSyncMenuInternal(options);
|
||||||
require(["registrationServices", 'dialogHelper', 'formDialogStyle'], function (registrationServices, dialogHelper) {
|
|
||||||
registrationServices.validateFeature('sync').then(function () {
|
|
||||||
|
|
||||||
showSyncMenuInternal(dialogHelper, options).then(resolve, reject);
|
|
||||||
|
|
||||||
}, reject);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +345,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSyncMenuInternal(dialogHelper, options) {
|
function showSyncMenuInternal(options) {
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(options.serverId);
|
var apiClient = connectionManager.getApiClient(options.serverId);
|
||||||
var userId = apiClient.getCurrentUserId();
|
var userId = apiClient.getCurrentUserId();
|
||||||
|
@ -431,7 +424,7 @@
|
||||||
|
|
||||||
dlg.querySelector('form').addEventListener('submit', function (e) {
|
dlg.querySelector('form').addEventListener('submit', function (e) {
|
||||||
|
|
||||||
submitted = submitJob(dlg, apiClient, userId, options, this, dialogHelper);
|
submitted = submitJob(dlg, apiClient, userId, options, this);
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -326,7 +326,7 @@
|
||||||
var instance;
|
var instance;
|
||||||
|
|
||||||
function onViewShow(e) {
|
function onViewShow(e) {
|
||||||
if (e.detail.type === 'video-osd') {
|
if (e.detail.type === 'video-osd' || !Dashboard.getCurrentUserId()) {
|
||||||
instance.hide();
|
instance.hide();
|
||||||
} else {
|
} else {
|
||||||
instance.show();
|
instance.show();
|
||||||
|
@ -341,12 +341,12 @@
|
||||||
self.element = render(options);
|
self.element = render(options);
|
||||||
|
|
||||||
events.on(connectionManager, 'localusersignedin', function (e, user) {
|
events.on(connectionManager, 'localusersignedin', function (e, user) {
|
||||||
self.element.classList.remove('hide');
|
self.show();
|
||||||
showUserTabs(user, self.element);
|
showUserTabs(user, self.element);
|
||||||
});
|
});
|
||||||
|
|
||||||
events.on(connectionManager, 'localusersignedout', function () {
|
events.on(connectionManager, 'localusersignedout', function () {
|
||||||
self.element.classList.add('hide');
|
self.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
showCurrentUserTabs(self.element);
|
showCurrentUserTabs(self.element);
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
positionTo: button,
|
positionTo: button,
|
||||||
callback: function (id) {
|
callback: function (id) {
|
||||||
|
|
||||||
player.setAudioStreamIndex(parseInt(id));
|
playbackManager.setAudioStreamIndex(parseInt(id), player);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
positionTo: button,
|
positionTo: button,
|
||||||
callback: function (id) {
|
callback: function (id) {
|
||||||
|
|
||||||
player.setSubtitleStreamIndex(parseInt(id));
|
playbackManager.setSubtitleStreamIndex(parseInt(id), player);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -382,22 +382,14 @@
|
||||||
|
|
||||||
var context = dlg;
|
var context = dlg;
|
||||||
|
|
||||||
var btnPause = context.querySelector('.btnPause');
|
var btnPlayPause = context.querySelector('.btnPlayPause');
|
||||||
var btnPlay = context.querySelector('.btnPlay');
|
|
||||||
|
|
||||||
buttonEnabled(btnPause, isActive);
|
|
||||||
buttonEnabled(btnPlay, isActive);
|
|
||||||
|
|
||||||
if (isPaused) {
|
if (isPaused) {
|
||||||
|
btnPlayPause.querySelector('i').innerHTML = 'play_arrow';
|
||||||
hideButton(btnPause);
|
|
||||||
showButton(btnPlay);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
btnPlayPause.querySelector('i').innerHTML = 'pause';
|
||||||
showButton(btnPause);
|
|
||||||
hideButton(btnPlay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buttonEnabled(btnPlayPause, isActive);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTimeDisplay(positionTicks, runtimeTicks) {
|
function updateTimeDisplay(positionTicks, runtimeTicks) {
|
||||||
|
@ -681,17 +673,10 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
context.querySelector('.btnPlay').addEventListener('click', function () {
|
context.querySelector('.btnPlayPause').addEventListener('click', function () {
|
||||||
|
|
||||||
if (currentPlayer) {
|
if (currentPlayer) {
|
||||||
currentPlayer.unpause();
|
playbackManager.playPause(currentPlayer);
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
context.querySelector('.btnPause').addEventListener('click', function () {
|
|
||||||
|
|
||||||
if (currentPlayer) {
|
|
||||||
currentPlayer.pause();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -50,14 +50,10 @@
|
||||||
<i class="md-icon">skip_previous</i>
|
<i class="md-icon">skip_previous</i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button is="paper-icon-button-light" class="btnPause btnPlayStateCommand autoSize" title="${ButtonPause}">
|
<button is="paper-icon-button-light" class="btnPlayPause btnPlayStateCommand autoSize" title="${ButtonPause}">
|
||||||
<i class="md-icon">pause</i>
|
<i class="md-icon">pause</i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button is="paper-icon-button-light" class="btnPlay btnPlayStateCommand autoSize" title="${ButtonPlay}">
|
|
||||||
<i class="md-icon">play_arrow</i>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button is="paper-icon-button-light" class="btnPlayStateCommand btnStop autoSize" title="${ButtonStop}">
|
<button is="paper-icon-button-light" class="btnPlayStateCommand btnStop autoSize" title="${ButtonStop}">
|
||||||
<i class="md-icon">stop</i>
|
<i class="md-icon">stop</i>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPortraitShape() {
|
function getPortraitShape() {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSquareShape() {
|
function getSquareShape() {
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.initTab = function () {
|
self.initTab = function () {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
return browserInfo.mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbShape() {
|
function getThumbShape() {
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width:480px) {
|
@media all and (max-width:480px) {
|
||||||
.osdPoster {
|
.osdPoster, .btnRewind, .btnFastForward {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue