1
0

Added -webkit-mask-image to work on Chrome.

This commit is contained in:
Alexander Andreev 2023-08-20 02:19:04 +04:00
parent 3566e90b1a
commit af0cbda364
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 5 additions and 1 deletions

View File

@ -138,6 +138,7 @@ section { margin-top: 1rem; }
#play {
background-color: var(--primary-color);
mask-image: url(/assets/img/play.svg);
-webkit-mask-image: url(/assets/img/play.svg);
height: 3rem;
width: 3rem; }

View File

@ -61,7 +61,10 @@ $("play").addEventListener("click", e => {
audio.pause();
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 => {
const ct = e.target.currentTime;