Skip to content

Commit

Permalink
fix(audio): howler suspended context
Browse files Browse the repository at this point in the history
  • Loading branch information
liana-p committed Jun 15, 2023
1 parent 525374c commit 8411931
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/narrat/src/stores/audio-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const useAudio = defineStore('audio', {
async playChannel(mode: AudioModeKey, audio: string, channelIndex: number) {
if (Howler.ctx.state === 'suspended') {
console.warn('Audio context is suspended :o');
Howler.ctx.resume();
// return;
}
const audioChannel = this.getAudioChannel(mode, channelIndex);
Expand Down

0 comments on commit 8411931

Please sign in to comment.