mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added cast icon to now playing bar to send current media to another client
This commit is contained in:
parent
1b1feb66cc
commit
d994150c28
14 changed files with 87 additions and 114 deletions
|
@ -24,7 +24,24 @@
|
|||
|
||||
self.playlist = [];
|
||||
var currentPlaylistIndex = 0;
|
||||
var channelsList;
|
||||
|
||||
var channelsListPromise;
|
||||
var channelsListPromiseTime;
|
||||
|
||||
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.
|
||||
|
@ -655,21 +672,12 @@
|
|||
currentItem = item;
|
||||
curentDurationTicks = item.RunTimeTicks;
|
||||
|
||||
if (!channelsList) {
|
||||
getChannelsListPromise().done(function (result) {
|
||||
|
||||
ApiClient.getLiveTvChannels({
|
||||
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
channelsList = result.Items;
|
||||
|
||||
if (result.Items.length) {
|
||||
channelsButton.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (result.Items.length) {
|
||||
channelsButton.show();
|
||||
}
|
||||
});
|
||||
|
||||
return videoElement[0];
|
||||
};
|
||||
|
@ -1734,11 +1742,14 @@
|
|||
|
||||
var flyout = $('#channelsFlyout');
|
||||
|
||||
var channels = channelsList || [];
|
||||
|
||||
showFlyout(flyout, '#channelsButton');
|
||||
if (!flyout.is(':visible')) {
|
||||
getChannelsListPromise().done(function (result) {
|
||||
|
||||
flyout.html(getChannelsFlyoutHtml(channels)).scrollTop(0);
|
||||
showFlyout(flyout, '#channelsButton');
|
||||
|
||||
flyout.html(getChannelsFlyoutHtml(result.Items)).scrollTop(0);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
self.showAudioTracksFlyout = function () {
|
||||
|
@ -1799,6 +1810,14 @@
|
|||
|
||||
}
|
||||
};
|
||||
|
||||
self.showSendMediaMenu = function () {
|
||||
|
||||
RemoteControl.showMenuForItem({
|
||||
item: currentItem
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
window.MediaPlayer = new mediaPlayer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue