volume icon verbeteringen
This commit is contained in:
@@ -285,7 +285,7 @@ input[type="range"]#seek::-webkit-slider-runnable-track{
|
|||||||
}
|
}
|
||||||
|
|
||||||
#media-control #volume {
|
#media-control #volume {
|
||||||
background-image:url(img/muted.png);
|
background-image:url(img/volume.png);
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
background-position: 0 50%;
|
background-position: 0 50%;
|
||||||
@@ -295,6 +295,9 @@ input[type="range"]#seek::-webkit-slider-runnable-track{
|
|||||||
#media-control #volume.playing {
|
#media-control #volume.playing {
|
||||||
background-image:url(img/pawel.png);
|
background-image:url(img/pawel.png);
|
||||||
}
|
}
|
||||||
|
#media-control #volume.muted {
|
||||||
|
background-image:url(img/muted.png);
|
||||||
|
}
|
||||||
|
|
||||||
#volume::-moz-range-thumb {
|
#volume::-moz-range-thumb {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|||||||
@@ -101,10 +101,12 @@
|
|||||||
console.log(event);
|
console.log(event);
|
||||||
let volume = event.target.value / 11;
|
let volume = event.target.value / 11;
|
||||||
event.target.classList.add("playing");
|
event.target.classList.add("playing");
|
||||||
|
event.target.classList.remove("muted");
|
||||||
kankerherrie.play();
|
kankerherrie.play();
|
||||||
if (volume <= 1/11) {
|
if (volume <= 1/11) {
|
||||||
kankerherrie.pause();
|
kankerherrie.pause();
|
||||||
event.target.classList.remove("playing");
|
event.target.classList.remove("playing");
|
||||||
|
event.target.classList.add("muted");
|
||||||
}
|
}
|
||||||
kankerherrie.volume = volume;
|
kankerherrie.volume = volume;
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user