1
0
Fork 0
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:
Luke Pulverenti 2016-02-09 13:05:12 -05:00
parent b90c1fc868
commit 06c88752b1
4 changed files with 19 additions and 12 deletions

View file

@ -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;
}
}