mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #896 - Chromecast icon needs to be displayed while playing videos on the web
This commit is contained in:
parent
b90c1fc868
commit
06c88752b1
4 changed files with 19 additions and 12 deletions
|
@ -674,22 +674,24 @@
|
|||
|
||||
function updateCastIcon() {
|
||||
|
||||
var context = document;
|
||||
|
||||
var btnCast = context.querySelector('.btnCast');
|
||||
|
||||
var info = MediaController.getPlayerInfo();
|
||||
|
||||
if (info.isLocalPlayer) {
|
||||
|
||||
$('.btnCast').removeClass('btnActiveCast').each(function () {
|
||||
this.icon = 'cast';
|
||||
});
|
||||
$('.headerSelectedPlayer').html('');
|
||||
btnCast.icon = 'cast';
|
||||
btnCast.classList.remove('btnActiveCast');
|
||||
|
||||
context.querySelector('.headerSelectedPlayer').innerHTML = '';
|
||||
|
||||
} else {
|
||||
|
||||
$('.btnCast').addClass('btnActiveCast').each(function () {
|
||||
this.icon = 'cast-connected';
|
||||
});
|
||||
|
||||
$('.headerSelectedPlayer').html((info.deviceName || info.name));
|
||||
btnCast.icon = 'cast-connected';
|
||||
btnCast.classList.add('btnActiveCast');
|
||||
context.querySelector('.headerSelectedPlayer').innerHTML = info.deviceName || info.name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue