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

switch to shared play menu

This commit is contained in:
Luke Pulverenti 2016-07-17 16:30:14 -04:00
parent c56e87cd63
commit c925a314cf
2 changed files with 14 additions and 110 deletions

View file

@ -1984,27 +1984,31 @@
}
}
function showPlayMenu(item, target) {
require(['playMenu'], function (playMenu) {
playMenu.show({
item: item,
positionTo: target
});
});
}
function playCurrentItem(button) {
if (currentItem.Type == 'Program') {
ApiClient.getLiveTvChannel(currentItem.ChannelId, Dashboard.getCurrentUserId()).then(function (channel) {
LibraryBrowser.showPlayMenu(null, channel.Id, channel.Type, false, channel.MediaType, (channel.UserData || {}).PlaybackPositionTicks);
showPlayMenu(channel, button);
});
return;
}
var userdata = currentItem.UserData || {};
var mediaType = currentItem.MediaType;
if (currentItem.Type == "MusicArtist" || currentItem.Type == "MusicAlbum") {
mediaType = "Audio";
}
LibraryBrowser.showPlayMenu(button, currentItem.Id, currentItem.Type, currentItem.IsFolder, mediaType, userdata.PlaybackPositionTicks);
showPlayMenu(currentItem, button);
}
function deleteTimer(page, params, id) {