mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-06 14:30:31 +02:00
hange to svg
This commit is contained in:
parent
5e8f63d6c3
commit
11b71edc46
7 changed files with 57 additions and 12 deletions
12
bio/audio.js
12
bio/audio.js
|
@ -1,6 +1,6 @@
|
|||
const songs = [
|
||||
{
|
||||
song: "Yabujin - Open",
|
||||
song: "YABUJIN - Open",
|
||||
src: "https://easyfiles.cc/2025/5/5a9bf2f5-3844-4e0c-8dfb-943012f4acd8/YABUJIN%20-%20open.mp4",
|
||||
duration: 123
|
||||
},
|
||||
|
@ -81,16 +81,20 @@ document.getElementById("next").addEventListener("click", () => {
|
|||
}
|
||||
});
|
||||
|
||||
playPauseButton.innerHTML = '<img id="plIcon" src="./assets/pause.svg">';
|
||||
const icon = document.getElementById('plIcon');
|
||||
playPauseButton.addEventListener("click", () => {
|
||||
if (isPlaying) {
|
||||
videoPlayer.pause();
|
||||
playPauseButton.innerHTML = "►";
|
||||
icon.src = "./assets/play.svg";
|
||||
} else {
|
||||
videoPlayer.play();
|
||||
playPauseButton.innerHTML = "❚❚";
|
||||
} isPlaying = ! isPlaying;
|
||||
icon.src = "./assets/pause.svg";
|
||||
}
|
||||
isPlaying = !isPlaying;
|
||||
});
|
||||
|
||||
|
||||
videoPlayer.addEventListener("ended", () => {
|
||||
currentSongIndex = (currentSongIndex + 1) % songs.length;
|
||||
loadSong(currentSongIndex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue