mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-01-14 06:51:08 +00:00
78 lines
703 B
JavaScript
78 lines
703 B
JavaScript
let _id = 0;
|
|
|
|
class WorkerAudio {
|
|
id = ++_id;
|
|
|
|
get src() {
|
|
|
|
}
|
|
set src(str) {
|
|
|
|
}
|
|
|
|
get loop() {
|
|
|
|
}
|
|
set loop(v) {
|
|
|
|
}
|
|
_loop = false;
|
|
|
|
get volume() {
|
|
|
|
}
|
|
set volume(v) {
|
|
|
|
}
|
|
_volume = 1;
|
|
|
|
// 只读,从 Worker 单向同步值
|
|
duration = 0;
|
|
currentTime = 0;
|
|
paused = true;
|
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
get src() {
|
|
|
|
}
|
|
set src(clip) {
|
|
|
|
}
|
|
|
|
play() {
|
|
|
|
}
|
|
|
|
pause() {
|
|
|
|
}
|
|
|
|
seek() {
|
|
|
|
}
|
|
|
|
stop() {
|
|
|
|
}
|
|
|
|
destroy() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var audioWorkerAdapter = {
|
|
on(id, callback) {
|
|
|
|
},
|
|
off(id, callback) {
|
|
|
|
},
|
|
};
|
|
|
|
globalThis.WorkerAudio = WorkerAudio;
|
|
module.exports = audioWorkerAdapter;
|