@eva/plugin-sound 2.0.0-beta.1 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EVA.plugin.sound.js +1708 -482
- package/dist/EVA.plugin.sound.min.js +1 -1
- package/dist/plugin-sound.cjs.js +131 -427
- package/dist/plugin-sound.cjs.prod.js +3 -2
- package/dist/plugin-sound.d.ts +8 -28
- package/dist/plugin-sound.esm.js +132 -428
- package/package.json +5 -3
package/dist/plugin-sound.d.ts
CHANGED
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
import { Component } from '@eva/eva.js';
|
|
2
2
|
import { ComponentChanged } from '@eva/eva.js';
|
|
3
|
+
import { Sound as Sound_2 } from '@pixi/sound';
|
|
3
4
|
import { System } from '@eva/eva.js';
|
|
4
5
|
|
|
5
6
|
export declare class Sound extends Component<SoundParams> {
|
|
6
7
|
static componentName: string;
|
|
7
|
-
systemContext: AudioContext;
|
|
8
|
+
get systemContext(): AudioContext;
|
|
8
9
|
systemDestination: GainNode;
|
|
9
|
-
playing: boolean;
|
|
10
|
+
get playing(): boolean;
|
|
10
11
|
state: 'unloaded' | 'loading' | 'loaded';
|
|
11
12
|
config: SoundParams;
|
|
12
|
-
private buffer;
|
|
13
|
-
private sourceNode;
|
|
14
|
-
private gainNode;
|
|
15
|
-
private paused;
|
|
16
|
-
private playTime;
|
|
17
|
-
private startTime;
|
|
18
|
-
private duration;
|
|
19
13
|
private actionQueue;
|
|
20
|
-
|
|
14
|
+
startTime: number;
|
|
15
|
+
private buffer;
|
|
21
16
|
get muted(): boolean;
|
|
22
17
|
set muted(v: boolean);
|
|
23
18
|
get volume(): number;
|
|
24
19
|
set volume(v: number);
|
|
25
20
|
init(obj?: SoundParams): void;
|
|
26
21
|
play(): void;
|
|
22
|
+
resume(): void;
|
|
27
23
|
pause(): void;
|
|
28
24
|
stop(): void;
|
|
29
|
-
onload(buffer:
|
|
25
|
+
onload(buffer: Sound_2): void;
|
|
30
26
|
onDestroy(): void;
|
|
31
|
-
private resetConfig;
|
|
32
|
-
private getCurrentTime;
|
|
33
|
-
private createSource;
|
|
34
|
-
private destroySource;
|
|
35
27
|
}
|
|
36
28
|
|
|
37
29
|
declare interface SoundParams {
|
|
@@ -41,39 +33,27 @@ declare interface SoundParams {
|
|
|
41
33
|
volume?: number;
|
|
42
34
|
loop?: boolean;
|
|
43
35
|
seek?: number;
|
|
36
|
+
speed?: number;
|
|
44
37
|
duration?: number;
|
|
45
38
|
onEnd?: () => void;
|
|
46
39
|
}
|
|
47
40
|
|
|
48
41
|
export declare class SoundSystem extends System {
|
|
49
42
|
static systemName: string;
|
|
50
|
-
private ctx;
|
|
51
|
-
private gainNode;
|
|
52
43
|
private autoPauseAndStart;
|
|
53
44
|
private onError;
|
|
54
45
|
private components;
|
|
55
|
-
private pausedComponents;
|
|
56
46
|
private audioBufferCache;
|
|
57
|
-
private decodeAudioPromiseMap;
|
|
58
|
-
get muted(): boolean;
|
|
59
|
-
set muted(v: boolean);
|
|
60
|
-
get volume(): number;
|
|
61
|
-
set volume(v: number);
|
|
62
|
-
get audioLocked(): boolean;
|
|
63
47
|
constructor(obj?: SoundSystemParams);
|
|
64
48
|
resumeAll(): void;
|
|
65
49
|
pauseAll(): void;
|
|
66
50
|
stopAll(): void;
|
|
67
|
-
init(): void;
|
|
68
51
|
update(): void;
|
|
69
52
|
onResume(): void;
|
|
70
53
|
onPause(): void;
|
|
71
54
|
onDestroy(): void;
|
|
72
55
|
componentChanged(changed: ComponentChanged): Promise<void>;
|
|
73
|
-
private setupAudioContext;
|
|
74
|
-
private unlockAudio;
|
|
75
56
|
private add;
|
|
76
|
-
private decodeAudioData;
|
|
77
57
|
}
|
|
78
58
|
|
|
79
59
|
declare interface SoundSystemParams {
|