mirror of
https://codeberg.org/vlw/still-alive.git
synced 2025-09-14 08:23:41 +02:00
The JS-part of this demo is now functional to the point where a Monkeydo manifest can be played on the different windows. CSS styling and an actual manifest will still have to be created.
16 lines
No EOL
502 B
JavaScript
Executable file
16 lines
No EOL
502 B
JavaScript
Executable file
import { default as Player } from "./modules/PlayerManager.mjs";
|
|
|
|
const play = document.getElementById("play");
|
|
const message = document.getElementById("message");
|
|
|
|
try {
|
|
if(typeof BroadcastChannel !== "function") {
|
|
throw new Error("BroadcastChannel API is not supported");
|
|
}
|
|
const player = new Player();
|
|
play.addEventListener("click",() => player.play());
|
|
} catch(error) {
|
|
play.classList.add("unsupported");
|
|
play.innerText = "Your browser can not play this demo";
|
|
message.innerText = error;
|
|
} |