feat(admin): add award sound effect button
This commit is contained in:
@@ -22,6 +22,7 @@ const AUDIO_TRACKS: Record<string, string> = {
|
|||||||
bgm: '/screen/audio/bgm.mp3',
|
bgm: '/screen/audio/bgm.mp3',
|
||||||
lottery: '/screen/audio/lottery.mp3',
|
lottery: '/screen/audio/lottery.mp3',
|
||||||
fanfare: '/screen/audio/fanfare.mp3',
|
fanfare: '/screen/audio/fanfare.mp3',
|
||||||
|
award: '/screen/audio/award.mp3',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useDisplayStore = defineStore('display', () => {
|
export const useDisplayStore = defineStore('display', () => {
|
||||||
|
|||||||
@@ -577,6 +577,10 @@ function playFanfare() {
|
|||||||
admin.controlMusic('play', 'fanfare');
|
admin.controlMusic('play', 'fanfare');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function playAward() {
|
||||||
|
admin.controlMusic('play', 'award');
|
||||||
|
}
|
||||||
|
|
||||||
// QR Code display control
|
// QR Code display control
|
||||||
function showEntryQR() {
|
function showEntryQR() {
|
||||||
const socket = admin.getSocket();
|
const socket = admin.getSocket();
|
||||||
@@ -1122,6 +1126,9 @@ onMounted(() => {
|
|||||||
<button class="ctrl-btn" @click="playFanfare">
|
<button class="ctrl-btn" @click="playFanfare">
|
||||||
播放礼花音效
|
播放礼花音效
|
||||||
</button>
|
</button>
|
||||||
|
<button class="ctrl-btn" @click="playAward">
|
||||||
|
播放颁奖音效
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export interface LotteryWinner {
|
|||||||
|
|
||||||
export interface MusicState {
|
export interface MusicState {
|
||||||
isPlaying: boolean;
|
isPlaying: boolean;
|
||||||
track: 'bgm' | 'lottery' | 'fanfare' | 'none';
|
track: 'bgm' | 'lottery' | 'fanfare' | 'award' | 'none';
|
||||||
volume: number;
|
volume: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user