Skip to content

Commit 7d9bcec

Browse files
committed
expose playSound
1 parent 76c0540 commit 7d9bcec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/basicSounds.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export async function loadSound (path: string, contents = path) {
4747
if (isCypress()) throw err
4848
}
4949
}
50+
window.loadSound = loadSound
5051

5152
export const loadOrPlaySound = async (url, soundVolume = 1, loadTimeout = options.remoteSoundsLoadTimeout, loop = false, isMusic = false) => {
5253
const soundBuffer = sounds[url]
@@ -118,6 +119,7 @@ export async function playSound (url, soundVolume = 1, loop = false, isMusic = f
118119
gainNode,
119120
}
120121
}
122+
window.playSound = playSound
121123

122124
export function stopAllSounds () {
123125
for (const { source } of activeSounds) {

0 commit comments

Comments
 (0)