mirror of
https://codeberg.org/vlw/still-alive.git
synced 2025-09-14 00:13:41 +02:00
Everything is cued up and good to go. Now comes the fun part of syncing the lyrics with the song
21 lines
No EOL
581 B
JavaScript
Executable file
21 lines
No EOL
581 B
JavaScript
Executable file
import { default as Player } from "./modules/PlayerManager.mjs";
|
|
|
|
const play = document.getElementById("play");
|
|
|
|
try {
|
|
if(typeof BroadcastChannel !== "function") {
|
|
throw new Error("BroadcastChannel API is not supported");
|
|
}
|
|
|
|
const mediaElement = document.getElementById("still-alive");
|
|
|
|
const player = new Player(mediaElement);
|
|
play.addEventListener("click",() => player.init());
|
|
} catch(error) {
|
|
const message = document.getElementById("message");
|
|
|
|
play.classList.add("unsupported");
|
|
play.innerText = "Your browser can not play this demo";
|
|
|
|
message.innerText = error;
|
|
} |