forked from abner/for-legacy-web
Run prettier on all files.
This commit is contained in:
1851
src/assets/emojis.ts
1851
src/assets/emojis.ts
File diff suppressed because one or more lines are too long
@@ -1,24 +1,29 @@
|
||||
import message from './message.mp3';
|
||||
import outbound from './outbound.mp3';
|
||||
import call_join from './call_join.mp3';
|
||||
import call_leave from './call_leave.mp3';
|
||||
import call_join from "./call_join.mp3";
|
||||
import call_leave from "./call_leave.mp3";
|
||||
import message from "./message.mp3";
|
||||
import outbound from "./outbound.mp3";
|
||||
|
||||
const SoundMap: { [key in Sounds]: string } = {
|
||||
message,
|
||||
outbound,
|
||||
call_join,
|
||||
call_leave
|
||||
}
|
||||
message,
|
||||
outbound,
|
||||
call_join,
|
||||
call_leave,
|
||||
};
|
||||
|
||||
export type Sounds = 'message' | 'outbound' | 'call_join' | 'call_leave';
|
||||
export const SOUNDS_ARRAY: Sounds[] = [ 'message', 'outbound', 'call_join', 'call_leave' ];
|
||||
export type Sounds = "message" | "outbound" | "call_join" | "call_leave";
|
||||
export const SOUNDS_ARRAY: Sounds[] = [
|
||||
"message",
|
||||
"outbound",
|
||||
"call_join",
|
||||
"call_leave",
|
||||
];
|
||||
|
||||
export function playSound(sound: Sounds) {
|
||||
let file = SoundMap[sound];
|
||||
let el = new Audio(file);
|
||||
try {
|
||||
el.play();
|
||||
} catch (err) {
|
||||
console.error('Failed to play audio file', file, err);
|
||||
}
|
||||
let file = SoundMap[sound];
|
||||
let el = new Audio(file);
|
||||
try {
|
||||
el.play();
|
||||
} catch (err) {
|
||||
console.error("Failed to play audio file", file, err);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user