blob: 5733911b3bb20a25c7c8c15126378d54fc91932d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { opusCheck } from "../../dom/opusCheck";
export const createMusic = () => {
const audioChannels = document.getElementsByClassName(
"audioChannel",
) as HTMLCollectionOf<HTMLAudioElement>;
const music = [...audioChannels];
music.forEach((channel: HTMLAudioElement) => (channel.volume = 0.5));
music.forEach(
(channel: HTMLAudioElement) => (channel.onerror = opusCheck(channel)),
);
return music;
};
|