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

implement keep up to

This commit is contained in:
Luke Pulverenti 2016-09-27 01:13:56 -04:00
parent 633e2f0222
commit 2efcbc740d
14 changed files with 111 additions and 43 deletions

View file

@ -263,12 +263,14 @@ define(['browser'], function (browser) {
// Otherwise with HLS and mp3 audio we're seeing some browsers // Otherwise with HLS and mp3 audio we're seeing some browsers
// safari is lying // safari is lying
if ((videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !browser.safari) || browser.edgeUwp || browser.tizen) { if ((videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !browser.safari) || browser.edgeUwp || browser.tizen) {
videoAudioCodecs.push('ac3'); if ((options.disableVideoAudioCodecs || []).indexOf('ac3') == -1) {
videoAudioCodecs.push('ac3');
// This works in edge desktop, but not mobile // This works in edge desktop, but not mobile
// TODO: Retest this on mobile // TODO: Retest this on mobile
if (!browser.edge || !browser.touch) { if (!browser.edge || !browser.touch) {
hlsVideoAudioCodecs.push('ac3'); hlsVideoAudioCodecs.push('ac3');
}
} }
} }

View file

@ -1188,7 +1188,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
} }
if (!imgUrl) { if (!imgUrl) {
var defaultName = item.EpisodeTitle ? item.Name : itemHelper.getDisplayName(item); var defaultName = item.Type == 'Program' ? item.Name : itemHelper.getDisplayName(item);
cardImageContainerOpen += '<div class="cardText cardCenteredText">' + defaultName + '</div>'; cardImageContainerOpen += '<div class="cardText cardCenteredText">' + defaultName + '</div>';
} }

View file

@ -105,7 +105,7 @@ define(['css!./indicators.css', 'material-icons'], function () {
return '<i class="md-icon timerIndicator timerIndicator-inactive indicatorIcon">&#xE062;</i>'; return '<i class="md-icon timerIndicator timerIndicator-inactive indicatorIcon">&#xE062;</i>';
} }
} }
else if (item.TimerId) { else if (item.TimerId || item.Type == 'Timer') {
return '<i class="md-icon timerIndicator indicatorIcon">&#xE061;</i>'; return '<i class="md-icon timerIndicator indicatorIcon">&#xE061;</i>';
} }

View file

@ -140,13 +140,6 @@
html += '<button is="emby-button" class="itemAction autoSize fab cardOverlayFab mini" data-action="menu" data-playoptions="false"><i class="md-icon cardOverlayFab-md-icon">' + moreIcon + '</i></button>'; html += '<button is="emby-button" class="itemAction autoSize fab cardOverlayFab mini" data-action="menu" data-playoptions="false"><i class="md-icon cardOverlayFab-md-icon">' + moreIcon + '</i></button>';
buttonCount++; buttonCount++;
html += userdataButtons.getIconsHtml({
item: item,
style: 'fab-mini',
cssClass: 'cardOverlayFab',
iconCssClass: 'cardOverlayFab-md-icon'
});
html += '</div>'; html += '</div>';
html += '</div>'; html += '</div>';
@ -215,6 +208,16 @@
innerElem.innerHTML = getOverlayHtml(apiClient, item, user, dataElement); innerElem.innerHTML = getOverlayHtml(apiClient, item, user, dataElement);
userdataButtons.fill({
item: item,
style: 'fab-mini',
cssClass: 'cardOverlayFab',
iconCssClass: 'cardOverlayFab-md-icon',
element: innerElem.querySelector('.cardOverlayButtons'),
fillMode: 'insertAdjacent',
insertLocation: 'beforeend'
});
innerElem.querySelector('.cardOverlayButtons').addEventListener('click', onCardOverlayButtonsClick); innerElem.querySelector('.cardOverlayButtons').addEventListener('click', onCardOverlayButtonsClick);
}); });

View file

@ -1,4 +1,11 @@
define(['connectionManager', 'globalize', 'paper-icon-button-light', 'material-icons', 'emby-button', 'css!./userdatabuttons'], function (connectionManager, globalize) { define(['connectionManager', 'globalize', 'dom', 'paper-icon-button-light', 'material-icons', 'emby-button', 'css!./userdatabuttons'], function (connectionManager, globalize, dom) {
var userDataMethods = {
markPlayed: markPlayed,
markDislike: markDislike,
markLike: markLike,
markFavorite: markFavorite
};
function getUserDataButtonHtml(method, itemId, buttonCssClass, iconCssClass, icon, tooltip, style) { function getUserDataButtonHtml(method, itemId, buttonCssClass, iconCssClass, icon, tooltip, style) {
@ -22,16 +29,49 @@ define(['connectionManager', 'globalize', 'paper-icon-button-light', 'material-i
iconCssClass += 'md-icon'; iconCssClass += 'md-icon';
return '<button title="' + tooltip + '" data-itemid="' + itemId + '" is="' + is + '" class="' + className + '" onclick="UserDataButtons.' + method + '(this);return false;">\ return '<button title="' + tooltip + '" data-itemid="' + itemId + '" is="' + is + '" data-method="' + method + '" class="' + className + '">\
<i class="'+ iconCssClass + '">' + icon + '</i>\ <i class="'+ iconCssClass + '">' + icon + '</i>\
</button>'; </button>';
} }
function onContainerClick(e) {
var btnUserData = dom.parentWithClass(e.target, 'btnUserData');
if (!btnUserData) {
return;
}
var method = btnUserData.getAttribute('data-method');
userDataMethods[method](btnUserData);
}
function fill(options) { function fill(options) {
var html = getIconsHtml(options); var html = getIconsHtml(options);
options.element.innerHTML = html; if (options.fillMode == 'insertAdjacent') {
options.element.insertAdjacentHTML(options.insertLocation || 'beforeend', html);
} else {
options.element.innerHTML = html;
}
dom.removeEventListener(options.element, 'click', onContainerClick, {
passive: true
});
dom.addEventListener(options.element, 'click', onContainerClick, {
passive: true
});
}
function destroy(options) {
options.element.innerHTML = '';
dom.removeEventListener(options.element, 'click', onContainerClick, {
passive: true
});
} }
function getIconsHtml(options) { function getIconsHtml(options) {
@ -195,15 +235,9 @@ define(['connectionManager', 'globalize', 'paper-icon-button-light', 'material-i
return apiClient.clearUserItemRating(apiClient.getCurrentUserId(), id); return apiClient.clearUserItemRating(apiClient.getCurrentUserId(), id);
} }
window.UserDataButtons = {
markPlayed: markPlayed,
markDislike: markDislike,
markLike: markLike,
markFavorite: markFavorite
};
return { return {
fill: fill, fill: fill,
destroy: destroy,
getIconsHtml: getIconsHtml getIconsHtml: getIconsHtml
}; };

View file

@ -202,14 +202,17 @@
} }
ApiClient.getItem(Dashboard.getCurrentUserId(), item.Id).then(function (fullItem) { ApiClient.getItem(Dashboard.getCurrentUserId(), item.Id).then(function (fullItem) {
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = userdataButtons.getIconsHtml({ userdataButtons.fill({
item: fullItem, item: fullItem,
includePlayed: false, includePlayed: false,
style: 'fab-mini' style: 'fab-mini',
element: context.querySelector('.nowPlayingPageUserDataButtons')
}); });
}); });
} else { } else {
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = ''; userdataButtons.destroy({
element: context.querySelector('.nowPlayingPageUserDataButtons')
});
} }
} }

View file

@ -28,6 +28,10 @@ body:not(.dashboardDocument) .mainDrawerButton {
height: 50px; height: 50px;
} }
.ui-body-b .libraryViewNav {
box-shadow: none;
}
/*.viewMenuBar, .ui-body-b .libraryViewNav { /*.viewMenuBar, .ui-body-b .libraryViewNav {
background: rgba(34,35,38,.90); background: rgba(34,35,38,.90);
-webkit-backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);

View file

@ -242,10 +242,14 @@
passwordConfirm: page.querySelector('#txtSignupPasswordConfirm', page).value, passwordConfirm: page.querySelector('#txtSignupPasswordConfirm', page).value,
grecaptcha: greResponse grecaptcha: greResponse
}).then(function () { }).then(function (result) {
var msg = result.Validated ?
Globalize.translate('MessageThankYouForConnectSignUpNoValidation') :
Globalize.translate('MessageThankYouForConnectSignUp');
Dashboard.alert({ Dashboard.alert({
message: Globalize.translate('MessageThankYouForConnectSignUp'), message: msg,
callback: function () { callback: function () {
Dashboard.navigate('connectlogin.html?mode=welcome'); Dashboard.navigate('connectlogin.html?mode=welcome');
} }

View file

@ -196,7 +196,7 @@
// For now don't do this in edge because we lose some native audio support // For now don't do this in edge because we lose some native audio support
if (browser.edge) { if (browser.edge) {
return false; //return false;
} }
// hls.js is only in beta. needs more testing. // hls.js is only in beta. needs more testing.

View file

@ -1412,13 +1412,13 @@
var userDataIcons = page.querySelectorAll('.userDataIcons'); var userDataIcons = page.querySelectorAll('.userDataIcons');
var html = userdataButtons.getIconsHtml({
item: item,
style: 'fab-mini'
});
for (var i = 0, length = userDataIcons.length; i < length; i++) { for (var i = 0, length = userDataIcons.length; i < length; i++) {
userDataIcons[i].innerHTML = html;
userdataButtons.fill({
item: item,
style: 'fab-mini',
element: userDataIcons[i]
});
} }
} }

View file

@ -1008,7 +1008,7 @@
// Huge hack alert. Safari doesn't seem to like if the segments aren't available right away when playback starts // Huge hack alert. Safari doesn't seem to like if the segments aren't available right away when playback starts
// This will start the transcoding process before actually feeding the video url into the player // This will start the transcoding process before actually feeding the video url into the player
// Edit: Also seeing stalls from hls.js // Edit: Also seeing stalls from hls.js
if (!mediaSource.RunTimeTicks && isHls && !browser.edge) { if (!mediaSource.RunTimeTicks && isHls) {
var hlsPlaylistUrl = streamInfo.url.replace('master.m3u8', 'live.m3u8'); var hlsPlaylistUrl = streamInfo.url.replace('master.m3u8', 'live.m3u8');

View file

@ -163,11 +163,17 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
var playSessionId = getParameterByName('PlaySessionId', currentSrc); var playSessionId = getParameterByName('PlaySessionId', currentSrc);
var liveStreamId = getParameterByName('LiveStreamId', currentSrc); var liveStreamId = getParameterByName('LiveStreamId', currentSrc);
var disableVideoAudioCodecs = [];
if (!AppInfo.isNativeApp && !self.currentMediaSource.RunTimeTicks) {
disableVideoAudioCodecs.push('ac3');
}
Dashboard.getDeviceProfile(null, { Dashboard.getDeviceProfile(null, {
enableMkvProgressive: self.currentMediaSource.RunTimeTicks != null, enableMkvProgressive: self.currentMediaSource.RunTimeTicks != null,
enableTsProgressive: self.currentMediaSource.RunTimeTicks != null, enableTsProgressive: self.currentMediaSource.RunTimeTicks != null,
enableHls: !browserInfo.firefox || self.currentMediaSource.RunTimeTicks == null enableHls: !browserInfo.firefox || self.currentMediaSource.RunTimeTicks == null,
disableVideoAudioCodecs: disableVideoAudioCodecs
}).then(function (deviceProfile) { }).then(function (deviceProfile) {
@ -677,10 +683,17 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
var onBitrateDetected = function () { var onBitrateDetected = function () {
var disableVideoAudioCodecs = [];
if (!AppInfo.isNativeApp && !item.RunTimeTicks) {
disableVideoAudioCodecs.push('ac3');
}
Dashboard.getDeviceProfile(null, { Dashboard.getDeviceProfile(null, {
enableMkvProgressive: item.RunTimeTicks != null, enableMkvProgressive: item.RunTimeTicks != null,
enableTsProgressive: item.RunTimeTicks != null enableTsProgressive: item.RunTimeTicks != null,
disableVideoAudioCodecs: disableVideoAudioCodecs
}).then(function (deviceProfile) { }).then(function (deviceProfile) {
playOnDeviceProfileCreated(deviceProfile, item, startPosition, callback); playOnDeviceProfileCreated(deviceProfile, item, startPosition, callback);

View file

@ -596,13 +596,16 @@
if (nowPlayingItem.Id) { if (nowPlayingItem.Id) {
ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) { ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) {
nowPlayingUserData.innerHTML = userdataButtons.getIconsHtml({ userdataButtons.fill({
item: item, item: item,
includePlayed: false includePlayed: false,
element: nowPlayingUserData
}); });
}); });
} else { } else {
nowPlayingUserData.innerHTML = ''; userdataButtons.destroy({
element: nowPlayingUserData
});
} }
} }

View file

@ -1965,6 +1965,7 @@
"ErrorMessageUsernameInUse": "The username is already in use. Please choose a new name and try again.", "ErrorMessageUsernameInUse": "The username is already in use. Please choose a new name and try again.",
"ErrorMessageEmailInUse": "The email address is already in use. Please enter a new email address and try again, or use the forgot password feature.", "ErrorMessageEmailInUse": "The email address is already in use. Please enter a new email address and try again, or use the forgot password feature.",
"MessageThankYouForConnectSignUp": "Thank you for signing up for Emby Connect. An email will be sent to your address with instructions on how to confirm your new account. Please confirm the account and then return here to sign in.", "MessageThankYouForConnectSignUp": "Thank you for signing up for Emby Connect. An email will be sent to your address with instructions on how to confirm your new account. Please confirm the account and then return here to sign in.",
"MessageThankYouForConnectSignUpNoValidation": "Thank you for signing up for Emby Connect! You will now be asked to login with your Emby Connect information.",
"ButtonShare": "Share", "ButtonShare": "Share",
"HeaderConfirm": "Confirm", "HeaderConfirm": "Confirm",
"MessageConfirmDeleteTunerDevice": "Are you sure you wish to delete this device?", "MessageConfirmDeleteTunerDevice": "Are you sure you wish to delete this device?",
@ -2139,5 +2140,6 @@
"LabelConvertRecordingsTo": "Convert recordings to:", "LabelConvertRecordingsTo": "Convert recordings to:",
"HeaderUpcomingOnTV": "Upcoming On TV", "HeaderUpcomingOnTV": "Upcoming On TV",
"LabelOptionalNetworkPath": "(Optional) Shared network folder:", "LabelOptionalNetworkPath": "(Optional) Shared network folder:",
"LabelOptionalNetworkPathHelp": "If this folder is shared on your network, supplying the network share path can allow Emby apps on other devices to access media files directly." "LabelOptionalNetworkPathHelp": "If this folder is shared on your network, supplying the network share path can allow Emby apps on other devices to access media files directly.",
"ButtonPlayExternalPlayer": "Play with external player"
} }