Commit f0a8bbb3 authored by Master Q's avatar Master Q

push

parent 16714916
This diff is collapsed.
......@@ -63,7 +63,9 @@ export function playSound(src: string, loop: boolean = false) {
//循环的,且有缓存,取缓存的
if (soundHash[src] && loop) sound = soundHash[src]
//没有就新建
if (!sound) sound = new window['Howl']({ src: [src], autoplay: false, loop });
if (!sound) sound = new window['Howl']({ src: [src], autoplay: false, loop,
volume: src === Soundurl.moonCakeOut ? 0.6 : 1
});
//记录下,方便停止
soundHash[src] = sound;
//不循环删除缓存
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment