blob: 9bf5240f1782c4bcd1abf4c33f39556962bf5105 (
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>;
let music = [...audioChannels];
music.forEach((channel: HTMLAudioElement) => (channel.volume = 0.5));
music.forEach(
(channel: HTMLAudioElement) => (channel.onerror = opusCheck(channel))
);
return music;
};
|