mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support audio queuing without flyout
This commit is contained in:
parent
e91d8b6800
commit
ab0b54902f
6 changed files with 39 additions and 7 deletions
|
@ -51,6 +51,14 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detailTableButtonsCell {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detailTableButtonsCell button + button {
|
||||||
|
margin-left: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (min-width: 600px) {
|
@media all and (min-width: 600px) {
|
||||||
.tabletColumn {
|
.tabletColumn {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
|
|
@ -422,7 +422,10 @@
|
||||||
|
|
||||||
html += '<tr>';
|
html += '<tr>';
|
||||||
|
|
||||||
html += '<td><button class="btnPlay" data-icon="play" type="button" data-iconpos="notext" onclick="LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'Audio\', \'Audio\');">Play</button></td>';
|
html += '<td class="detailTableButtonsCell">';
|
||||||
|
html += '<button class="btnPlay" data-icon="play" type="button" data-iconpos="notext" onclick="LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'Audio\', \'Audio\');" data-inline="true" title="Play">Play</button>';
|
||||||
|
html += '<button class="btnQueue" data-icon="plus" type="button" data-iconpos="notext" onclick="MediaPlayer.queue(\'' + item.Id + '\');" data-inline="true" title="Queue">Queue</button>';
|
||||||
|
html += '</td>';
|
||||||
|
|
||||||
var num = item.IndexNumber;
|
var num = item.IndexNumber;
|
||||||
|
|
||||||
|
@ -2465,6 +2468,7 @@
|
||||||
|
|
||||||
var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem');
|
var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem');
|
||||||
var isPortrait = $(posterItem).hasClass('portraitPosterItem');
|
var isPortrait = $(posterItem).hasClass('portraitPosterItem');
|
||||||
|
var isSquare = $(posterItem).hasClass('squarePosterItem');
|
||||||
|
|
||||||
var parentName = isSmallItem || isPortrait ? null : item.SeriesName;
|
var parentName = isSmallItem || isPortrait ? null : item.SeriesName;
|
||||||
var name = LibraryBrowser.getPosterViewDisplayName(item, true);
|
var name = LibraryBrowser.getPosterViewDisplayName(item, true);
|
||||||
|
@ -2530,7 +2534,7 @@
|
||||||
|
|
||||||
html += '<div>';
|
html += '<div>';
|
||||||
|
|
||||||
var buttonMargin = isPortrait ? "margin:0 7px 0 0;" : "margin:0 10px 0 0;";
|
var buttonMargin = isPortrait || isSquare ? "margin:0 7px 0 0;" : "margin:0 10px 0 0;";
|
||||||
|
|
||||||
var buttonCount = 0;
|
var buttonCount = 0;
|
||||||
|
|
||||||
|
@ -2541,6 +2545,11 @@
|
||||||
|
|
||||||
html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext" title="Play" onclick="' + onPlayClick + '" style="' + buttonMargin + '">Play</button>';
|
html += '<button type="button" data-mini="true" data-inline="true" data-icon="play" data-iconpos="notext" title="Play" onclick="' + onPlayClick + '" style="' + buttonMargin + '">Play</button>';
|
||||||
buttonCount++;
|
buttonCount++;
|
||||||
|
|
||||||
|
if (item.MediaType == "Audio" || item.Type == "MusicAlbum") {
|
||||||
|
html += '<button type="button" data-mini="true" data-inline="true" data-icon="plus" data-iconpos="notext" title="Queue" onclick="MediaPlayer.queue(\'' + item.Id + '\');return false;" style="' + buttonMargin + '">Queue</button>';
|
||||||
|
buttonCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.LocalTrailerCount) {
|
if (item.LocalTrailerCount) {
|
||||||
|
@ -2642,7 +2651,7 @@
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.on('mouseenter', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem', onHoverIn).on('mouseleave', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem', onHoverOut);
|
return this.on('mouseenter', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverIn).on('mouseleave', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverOut);
|
||||||
};
|
};
|
||||||
|
|
||||||
})(jQuery, document, window);
|
})(jQuery, document, window);
|
|
@ -616,7 +616,6 @@
|
||||||
|
|
||||||
// Some 1080- videos are reported as 1912?
|
// Some 1080- videos are reported as 1912?
|
||||||
if (maxAllowedWidth >= 1910) {
|
if (maxAllowedWidth >= 1910) {
|
||||||
options.push({ name: '1080p - 15Mbps', maxWidth: 1920, bitrate: 15000000 });
|
|
||||||
options.push({ name: '1080p - 10Mbps', maxWidth: 1920, bitrate: 10000000 });
|
options.push({ name: '1080p - 10Mbps', maxWidth: 1920, bitrate: 10000000 });
|
||||||
options.push({ name: '1080p - 8Mbps', maxWidth: 1920, bitrate: 8000000 });
|
options.push({ name: '1080p - 8Mbps', maxWidth: 1920, bitrate: 8000000 });
|
||||||
options.push({ name: '1080p - 6Mbps', maxWidth: 1920, bitrate: 6000000 });
|
options.push({ name: '1080p - 6Mbps', maxWidth: 1920, bitrate: 6000000 });
|
||||||
|
@ -892,6 +891,17 @@
|
||||||
var errorCode = this.error ? this.error.code : '';
|
var errorCode = this.error ? this.error.code : '';
|
||||||
console.log('Html5 Video error code: ' + errorCode);
|
console.log('Html5 Video error code: ' + errorCode);
|
||||||
|
|
||||||
|
var errorMsg = 'There was an error playing the video.';
|
||||||
|
|
||||||
|
if (item.Type == "Channel") {
|
||||||
|
errorMsg += " Please ensure there is an open tuner availalble.";
|
||||||
|
}
|
||||||
|
|
||||||
|
Dashboard.alert({
|
||||||
|
title: 'Video Error',
|
||||||
|
message: errorMsg
|
||||||
|
});
|
||||||
|
|
||||||
}).on("ended.playbackstopped", onPlaybackStopped)
|
}).on("ended.playbackstopped", onPlaybackStopped)
|
||||||
.on('ended.playnext', playNextAfterEnded);
|
.on('ended.playnext', playNextAfterEnded);
|
||||||
|
|
||||||
|
@ -1467,6 +1477,11 @@
|
||||||
|
|
||||||
self.queue = function (id) {
|
self.queue = function (id) {
|
||||||
|
|
||||||
|
if (!currentMediaElement) {
|
||||||
|
self.playById(id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
|
ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
|
||||||
|
|
||||||
if (item.IsFolder) {
|
if (item.IsFolder) {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
$('#items', page).html(html).trigger('create');
|
$('#items', page).html(html).trigger('create').createPosterItemHoverMenu();
|
||||||
|
|
||||||
$('.selectPage', page).on('change', function () {
|
$('.selectPage', page).on('change', function () {
|
||||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
$('#items', page).html(html).trigger('create');
|
$('#items', page).html(html).trigger('create').createPosterItemHoverMenu();
|
||||||
|
|
||||||
$('.selectPage', page).on('change', function () {
|
$('.selectPage', page).on('change', function () {
|
||||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
$('#items', page).html(html).trigger('create');
|
$('#items', page).html(html).trigger('create').createPosterItemHoverMenu();
|
||||||
|
|
||||||
$('.selectPage', page).on('change', function () {
|
$('.selectPage', page).on('change', function () {
|
||||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue