Added -webkit-mask-image to work on Chrome.
This commit is contained in:
parent
3566e90b1a
commit
af0cbda364
@ -138,6 +138,7 @@ section { margin-top: 1rem; }
|
|||||||
#play {
|
#play {
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
mask-image: url(/assets/img/play.svg);
|
mask-image: url(/assets/img/play.svg);
|
||||||
|
-webkit-mask-image: url(/assets/img/play.svg);
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
width: 3rem; }
|
width: 3rem; }
|
||||||
|
|
||||||
|
@ -61,7 +61,10 @@ $("play").addEventListener("click", e => {
|
|||||||
audio.pause();
|
audio.pause();
|
||||||
audio.src = "";
|
audio.src = "";
|
||||||
}
|
}
|
||||||
e.target.style.maskImage = audio.paused ? "url(/assets/img/play.svg)" : "url(/assets/img/stop.svg)"; });
|
e.target.style.maskImage = audio.paused ?
|
||||||
|
"url(/assets/img/play.svg)" : "url(/assets/img/stop.svg)";
|
||||||
|
e.target.style.webkitMaskImage = audio.paused ?
|
||||||
|
"url(/assets/img/play.svg)" : "url(/assets/img/stop.svg)"; });
|
||||||
|
|
||||||
audio.addEventListener("timeupdate", e => {
|
audio.addEventListener("timeupdate", e => {
|
||||||
const ct = e.target.currentTime;
|
const ct = e.target.currentTime;
|
||||||
|
Loading…
Reference in New Issue
Block a user