mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 06:46:35 +00:00
Fix when showing covers for media player card
This commit is contained in:
parent
e2a03cb6fd
commit
968deae5b2
@ -324,14 +324,10 @@ Polymer({
|
|||||||
var cls = 'banner';
|
var cls = 'banner';
|
||||||
|
|
||||||
if (playerObj.isOff || playerObj.isIdle) {
|
if (playerObj.isOff || playerObj.isIdle) {
|
||||||
cls += ' is-off';
|
cls += ' is-off no-cover';
|
||||||
}
|
} else if (!playerObj.stateObj.attributes.entity_picture) {
|
||||||
|
|
||||||
if (!playerObj.stateObj.attributes.entity_picture) {
|
|
||||||
cls += ' no-cover';
|
cls += ' no-cover';
|
||||||
}
|
} else if (playerObj.stateObj.attributes.media_content_type === 'music') {
|
||||||
|
|
||||||
if (playerObj.stateObj.attributes.media_content_type === 'music') {
|
|
||||||
cls += ' content-type-music';
|
cls += ' content-type-music';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,16 +345,12 @@ Polymer({
|
|||||||
computePlaybackControlIcon: function (playerObj) {
|
computePlaybackControlIcon: function (playerObj) {
|
||||||
if (playerObj.isPlaying) {
|
if (playerObj.isPlaying) {
|
||||||
return playerObj.supportsPause ? 'mdi:pause' : 'mdi:stop';
|
return playerObj.supportsPause ? 'mdi:pause' : 'mdi:stop';
|
||||||
} else if (playerObj.isPaused || playerObj.isOff) {
|
} else if (playerObj.isPaused || playerObj.isOff || playerObj.isIdle) {
|
||||||
return 'mdi:play';
|
return 'mdi:play';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|
||||||
computeShowControls: function (playerObj) {
|
|
||||||
return !playerObj.isOff;
|
|
||||||
},
|
|
||||||
|
|
||||||
handleNext: function (ev) {
|
handleNext: function (ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
this.playerObj.nextTrack();
|
this.playerObj.nextTrack();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user