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

add play button to program page

This commit is contained in:
Luke Pulverenti 2014-01-11 22:29:55 -05:00
parent c1a71bf416
commit a929bf05f5
2 changed files with 17 additions and 1 deletions

View file

@ -54,7 +54,11 @@
$('#recordButtonContainer', page).hide();
}
if (MediaPlayer.canPlay(item)) {
var startDateLocal = parseISO8601Date(item.StartDate, { toLocal: true });
var endDateLocal = parseISO8601Date(item.EndDate, { toLocal: true });
var now = new Date();
if (now >= startDateLocal && now < endDateLocal) {
$('#playButtonContainer', page).show();
} else {
$('#playButtonContainer', page).hide();
@ -88,6 +92,15 @@
});
$('#btnPlay', page).on('click', function () {
ApiClient.getLiveTvChannel(currentItem.ChannelId, Dashboard.getCurrentUserId()).done(function (channel) {
var userdata = channel.UserData || {};
LibraryBrowser.showPlayMenu(this, channel.Id, channel.Type, channel.MediaType, userdata.PlaybackPositionTicks);
});
});
}).on('pageshow', "#liveTvProgramPage", function () {
var page = this;