mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove tv channels button
This commit is contained in:
parent
a7b5b2663e
commit
89c871ec2d
1 changed files with 0 additions and 95 deletions
|
@ -24,29 +24,11 @@
|
|||
self.playlist = [];
|
||||
var currentPlaylistIndex = 0;
|
||||
|
||||
var channelsListPromise;
|
||||
var channelsListPromiseTime;
|
||||
|
||||
function updateCanClientSeek(elem) {
|
||||
var duration = elem.duration;
|
||||
canClientSeek = duration && !isNaN(duration) && duration != Number.POSITIVE_INFINITY && duration != Number.NEGATIVE_INFINITY;
|
||||
}
|
||||
|
||||
function getChannelsListPromise() {
|
||||
|
||||
var lastUpdateTime = channelsListPromiseTime || 0;
|
||||
|
||||
// Update every three minutes
|
||||
if (!channelsListPromise || !lastUpdateTime || (new Date().getTime() - lastUpdateTime) > 10800000) {
|
||||
|
||||
channelsListPromise = ApiClient.getLiveTvChannels({
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
});
|
||||
}
|
||||
|
||||
return channelsListPromise;
|
||||
}
|
||||
|
||||
function requestFullScreen(element) {
|
||||
// Supports most browsers and their versions.
|
||||
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
|
||||
|
@ -347,16 +329,6 @@
|
|||
|
||||
hideFlyout($('#qualityFlyout'));
|
||||
});
|
||||
|
||||
$('#channelsFlyout').on('click', '.mediaFlyoutOption', function () {
|
||||
|
||||
if (!$(this).hasClass('selectedMediaFlyoutOption')) {
|
||||
var channelId = this.getAttribute('data-channelid');
|
||||
self.playById(channelId);
|
||||
}
|
||||
|
||||
hideFlyout($('#channelsFlyout'));
|
||||
});
|
||||
});
|
||||
|
||||
function endsWith(text, pattern) {
|
||||
|
@ -470,7 +442,6 @@
|
|||
$('#audioTracksButton', nowPlayingBar).hide();
|
||||
$('#subtitleButton', nowPlayingBar).hide();
|
||||
$('#chaptersButton', nowPlayingBar).hide();
|
||||
$('#channelsButton', nowPlayingBar).hide();
|
||||
|
||||
$('#mediaElement', nowPlayingBar).html(html);
|
||||
var audioElement = $("audio", nowPlayingBar);
|
||||
|
@ -846,8 +817,6 @@
|
|||
$('#fullscreenButton', nowPlayingBar).show();
|
||||
}
|
||||
|
||||
var channelsButton = $('#channelsButton', nowPlayingBar).hide();
|
||||
|
||||
var videoElement = $("video", nowPlayingBar);
|
||||
|
||||
var initialVolume = localStorage.getItem("volume") || 0.5;
|
||||
|
@ -916,15 +885,6 @@
|
|||
currentItem = item;
|
||||
curentDurationTicks = item.RunTimeTicks;
|
||||
|
||||
getChannelsListPromise().done(function (result) {
|
||||
|
||||
if (result.Items.length) {
|
||||
channelsButton.show();
|
||||
} else {
|
||||
channelsButton.hide();
|
||||
}
|
||||
});
|
||||
|
||||
return videoElement[0];
|
||||
};
|
||||
|
||||
|
@ -1904,61 +1864,6 @@
|
|||
return html;
|
||||
}
|
||||
|
||||
function getChannelsFlyoutHtml(channels) {
|
||||
|
||||
var html = '';
|
||||
|
||||
for (var i = 0, length = channels.length; i < length; i++) {
|
||||
|
||||
var channel = channels[i];
|
||||
|
||||
html += '<div data-channelid="' + channel.Id + '" class="mediaFlyoutOption">';
|
||||
|
||||
var imgUrl;
|
||||
|
||||
if (channel.ImageTags.Primary) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(channel.Id, {
|
||||
maxwidth: 200,
|
||||
tag: channel.ImageTags.Primary,
|
||||
type: "Primary"
|
||||
});
|
||||
}
|
||||
else {
|
||||
imgUrl = "css/images/media/tvflyout.png";
|
||||
}
|
||||
|
||||
html += '<img class="mediaFlyoutOptionImage" src="' + imgUrl + '" />';
|
||||
|
||||
html += '<div class="mediaFlyoutOptionContent">';
|
||||
|
||||
var name = channel.Number + ' ' + channel.Name;
|
||||
|
||||
html += '<div class="mediaFlyoutOptionName">' + name + '</div>';
|
||||
html += '<div class="mediaFlyoutOptionSecondaryText">' + channel.CurrentProgram.Name + '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
self.showChannelsFlyout = function () {
|
||||
|
||||
var flyout = $('#channelsFlyout');
|
||||
|
||||
if (!flyout.is(':visible')) {
|
||||
getChannelsListPromise().done(function (result) {
|
||||
|
||||
showFlyout(flyout, '#channelsButton');
|
||||
|
||||
flyout.html(getChannelsFlyoutHtml(result.Items)).scrollTop(0);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
self.showAudioTracksFlyout = function () {
|
||||
|
||||
var flyout = $('#audioTracksFlyout');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue