forked from rc/aircox
work on player, fix seek issue + show cover in the button
This commit is contained in:
parent
7752e37b74
commit
8d3400a0f6
|
@ -364,10 +364,23 @@ ul.list {
|
|||
.player .item:not([selected]) .button > img.play {
|
||||
display: block;
|
||||
}
|
||||
.player .item:not([selected]) .button > img:not(.play) {
|
||||
|
||||
.player .item:not([selected]) .button > img:not(.play):not(.cover) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.player .item .button > img.cover {
|
||||
display: block;
|
||||
position: absolute;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.player .item:hover .button > img.cover {
|
||||
/* display: none; */
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
main .player .actions .action:not(.add),
|
||||
.section_player .actions .action.add,
|
||||
|
|
|
@ -56,7 +56,7 @@ Sound.prototype = {
|
|||
if(this.detail)
|
||||
item.querySelector('.detail').href = this.detail;
|
||||
if(playlist.player.show_cover && this.cover)
|
||||
item.querySelector('img.play').src = this.cover;
|
||||
item.querySelector('img.cover').src = this.cover;
|
||||
|
||||
item.sound = this;
|
||||
this.item = item;
|
||||
|
@ -316,7 +316,9 @@ Player.prototype = {
|
|||
// progress
|
||||
progress = this.progress.bar;
|
||||
progress.addEventListener('click', function(event) {
|
||||
player.audio.currentTime = time_from_progress(event);
|
||||
self.audio.currentTime = time_from_progress(event);
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}, false);
|
||||
|
||||
progress.addEventListener('mouseout', update_info, false);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<div class="playlist">
|
||||
<li class='item list_item flex_row' style="display: none;">
|
||||
<div class="button">
|
||||
<img src="" class="cover"/>
|
||||
<img src="{% static "aircox/images/play.png" %}" class="play"
|
||||
title="{% trans "play" %}" />
|
||||
<img src="{% static "aircox/images/pause.png" %}" class="pause"
|
||||
|
|
Loading…
Reference in New Issue
Block a user