diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 8234fff9a..dab19ae71 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -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 += '