UNPKG

commonui-lib-test

Version:

"#common ui lib test"

45 lines (44 loc) 977 B
import BaseSound from "./BaseSound"; /** * @api {class} SoundBG 背景音樂播放 * @apiName SoundBG * @apiGroup sound * @apiDescription 背景音樂播放 */ export default class SoundBG extends BaseSound { private _currBg; private _currSound; private _currSoundChannel; private _volume; constructor(); /** * 停止当前音乐 */ stop(): void; /** * 播放某个音乐 * @param effectName */ play(effectName: string): void; /** * 播放 * @param sound */ private playSound; /** * 设置音量 * @param volume */ setVolume(volume: number): void; /** * 资源加载完成后处理播放 * @param key */ loadedPlay(key: string, soundPath: string): void; /** * 检测一个文件是否要清除 * @param key * @returns {boolean} */ checkCanClear(key: string): boolean; }