@zcomponent/core 1.9.1 → 1.11.0-beta
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/lib/behaviors/ActivateState.d.ts +2 -1
- package/lib/behaviors/ActivateState.js +2 -1
- package/lib/behaviors/CallFunction.d.ts +19 -0
- package/lib/behaviors/CallFunction.js +18 -0
- package/lib/behaviors/ConsoleLog.d.ts +1 -0
- package/lib/behaviors/ConsoleLog.js +1 -0
- package/lib/behaviors/DownloadSnapshot.d.ts +2 -1
- package/lib/behaviors/DownloadSnapshot.js +2 -1
- package/lib/behaviors/LaunchURL.d.ts +1 -0
- package/lib/behaviors/LaunchURL.js +1 -0
- package/lib/behaviors/LogAnalyticsEvent.d.ts +1 -0
- package/lib/behaviors/LogAnalyticsEvent.js +1 -0
- package/lib/behaviors/PauseLayerClip.d.ts +2 -1
- package/lib/behaviors/PauseLayerClip.js +2 -1
- package/lib/behaviors/PlayLayerClip.d.ts +2 -1
- package/lib/behaviors/PlayLayerClip.js +2 -1
- package/lib/behaviors/PlaySound.d.ts +2 -1
- package/lib/behaviors/PlaySound.js +2 -1
- package/lib/behaviors/SetLayerOff.d.ts +2 -1
- package/lib/behaviors/SetLayerOff.js +2 -1
- package/lib/behaviors/ShareSnapshot.d.ts +2 -1
- package/lib/behaviors/ShareSnapshot.js +2 -1
- package/lib/behaviors/ShowTextAlert.d.ts +3 -1
- package/lib/behaviors/ShowTextAlert.js +3 -1
- package/lib/behaviors/TakeSnapshot.d.ts +1 -0
- package/lib/behaviors/TakeSnapshot.js +1 -0
- package/lib/behaviors/ToggleLayerClips.d.ts +2 -1
- package/lib/behaviors/ToggleLayerClips.js +2 -1
- package/lib/behaviors/stream/PauseStream.d.ts +4 -1
- package/lib/behaviors/stream/PauseStream.js +4 -1
- package/lib/behaviors/stream/PlayStream.d.ts +2 -1
- package/lib/behaviors/stream/PlayStream.js +2 -1
- package/lib/behaviors/stream/SeekStream.d.ts +2 -1
- package/lib/behaviors/stream/SeekStream.js +2 -1
- package/lib/behaviors/stream/StopStream.d.ts +2 -1
- package/lib/behaviors/stream/StopStream.js +2 -1
- package/lib/component.d.ts +1 -1
- package/lib/components/Audio.d.ts +25 -13
- package/lib/components/Audio.js +17 -5
- package/lib/components/AudioLayerSettings.d.ts +1 -1
- package/lib/components/DefaultCookieConsent.d.ts +16 -16
- package/lib/components/DefaultLoader.d.ts +6 -6
- package/lib/components/Gamepad.d.ts +21 -21
- package/lib/components/LongLoad.d.ts +1 -1
- package/lib/components/SnapshotUI.d.ts +8 -8
- package/lib/contexts/analyticscontext.d.ts +3 -1
- package/lib/contexts/analyticscontext.js +2 -0
- package/lib/contexts/audiocontextcontext.d.ts +2 -2
- package/lib/contexts/canvascontext.d.ts +6 -6
- package/lib/contexts/cookieconsentcontext.d.ts +7 -7
- package/lib/contexts/environmentcontext.d.ts +5 -5
- package/lib/contexts/gamepadcontext.d.ts +2 -2
- package/lib/contexts/globaltagcontext.d.ts +1 -1
- package/lib/contexts/loadcontext.d.ts +8 -8
- package/lib/contexts/snapshotContext.d.ts +9 -9
- package/lib/contexts/tagcontext.d.ts +2 -2
- package/lib/contexts/tagcontext.js +1 -1
- package/lib/contexts/textalertcontext.d.ts +2 -0
- package/lib/contexts/textalertcontext.js +2 -0
- package/lib/contexts/usereventcontext.d.ts +2 -2
- package/lib/data/core.d.ts +29 -0
- package/lib/data/core.js +6 -0
- package/lib/entity.d.ts +2 -2
- package/lib/selectors.js +29 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.js +29 -1
- package/lib/zcomponent.d.ts +2 -0
- package/lib/zcomponent.js +68 -1
- package/package.json +1 -1
|
@@ -38,8 +38,9 @@ export declare class ActivateState extends ActionBehavior {
|
|
|
38
38
|
*/
|
|
39
39
|
easing?: string;
|
|
40
40
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
41
|
-
perform(): void;
|
|
42
41
|
/** @zprop */
|
|
42
|
+
perform(): void;
|
|
43
|
+
/** @zui */
|
|
43
44
|
preview(): void;
|
|
44
45
|
}
|
|
45
46
|
export declare enum Pin {
|
|
@@ -10,6 +10,7 @@ export class ActivateState extends ActionBehavior {
|
|
|
10
10
|
super(contextManager, instance, props);
|
|
11
11
|
this.zcomponent = this.getZComponentInstance();
|
|
12
12
|
}
|
|
13
|
+
/** @zprop */
|
|
13
14
|
perform() {
|
|
14
15
|
if (!this.state)
|
|
15
16
|
return;
|
|
@@ -25,7 +26,7 @@ export class ActivateState extends ActionBehavior {
|
|
|
25
26
|
};
|
|
26
27
|
layerclip.play(opts);
|
|
27
28
|
}
|
|
28
|
-
/** @
|
|
29
|
+
/** @zui */
|
|
29
30
|
preview() {
|
|
30
31
|
this.perform();
|
|
31
32
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionBehavior } from "../actionbehavior";
|
|
2
|
+
/**
|
|
3
|
+
* Calls an exposed function on a context
|
|
4
|
+
*
|
|
5
|
+
* @zbehavior
|
|
6
|
+
* @zicon function
|
|
7
|
+
* @zgroup Actions
|
|
8
|
+
*/
|
|
9
|
+
export declare class CallFunction extends ActionBehavior {
|
|
10
|
+
/**
|
|
11
|
+
* The function and arguments to call
|
|
12
|
+
* @zprop
|
|
13
|
+
*/
|
|
14
|
+
function: () => any;
|
|
15
|
+
/** @zui
|
|
16
|
+
* @zprop
|
|
17
|
+
*/
|
|
18
|
+
perform(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActionBehavior } from "../actionbehavior";
|
|
2
|
+
import { registerBehaviorRunAtDesignTime } from "../behavior";
|
|
3
|
+
/**
|
|
4
|
+
* Calls an exposed function on a context
|
|
5
|
+
*
|
|
6
|
+
* @zbehavior
|
|
7
|
+
* @zicon function
|
|
8
|
+
* @zgroup Actions
|
|
9
|
+
*/
|
|
10
|
+
export class CallFunction extends ActionBehavior {
|
|
11
|
+
/** @zui
|
|
12
|
+
* @zprop
|
|
13
|
+
*/
|
|
14
|
+
perform() {
|
|
15
|
+
this.function();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
registerBehaviorRunAtDesignTime(CallFunction);
|
|
@@ -14,8 +14,9 @@ export declare class DownloadSnapshot extends ActionBehavior<DownloadSnapshotPro
|
|
|
14
14
|
/** @zui */
|
|
15
15
|
onSave: Event<[]>;
|
|
16
16
|
constructor(contextManager: ContextManager, instance: Component, props: DownloadSnapshotProps);
|
|
17
|
+
/** @zprop */
|
|
17
18
|
perform(): void;
|
|
18
19
|
private download;
|
|
19
|
-
/** @
|
|
20
|
+
/** @zui */
|
|
20
21
|
preview(): void;
|
|
21
22
|
}
|
|
@@ -14,7 +14,8 @@ export declare class PauseLayerClip extends ActionBehavior {
|
|
|
14
14
|
*/
|
|
15
15
|
layerClip: string | undefined;
|
|
16
16
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
17
|
-
perform(): void;
|
|
18
17
|
/** @zprop */
|
|
18
|
+
perform(): void;
|
|
19
|
+
/** @zui */
|
|
19
20
|
preview(): void;
|
|
20
21
|
}
|
|
@@ -10,6 +10,7 @@ export class PauseLayerClip extends ActionBehavior {
|
|
|
10
10
|
super(contextManager, instance, props);
|
|
11
11
|
this.zcomponent = this.getZComponentInstance();
|
|
12
12
|
}
|
|
13
|
+
/** @zprop */
|
|
13
14
|
perform() {
|
|
14
15
|
if (!this.layerClip)
|
|
15
16
|
return;
|
|
@@ -18,7 +19,7 @@ export class PauseLayerClip extends ActionBehavior {
|
|
|
18
19
|
return;
|
|
19
20
|
layerclip.pause();
|
|
20
21
|
}
|
|
21
|
-
/** @
|
|
22
|
+
/** @zui */
|
|
22
23
|
preview() {
|
|
23
24
|
this.perform();
|
|
24
25
|
}
|
|
@@ -68,8 +68,9 @@ export declare class PlayLayerClip extends ActionBehavior {
|
|
|
68
68
|
*/
|
|
69
69
|
easing?: string;
|
|
70
70
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
71
|
-
perform(): void;
|
|
72
71
|
/** @zprop */
|
|
72
|
+
perform(): void;
|
|
73
|
+
/** @zui */
|
|
73
74
|
preview(): void;
|
|
74
75
|
}
|
|
75
76
|
export declare enum Pin {
|
|
@@ -26,6 +26,7 @@ export class PlayLayerClip extends ActionBehavior {
|
|
|
26
26
|
*/
|
|
27
27
|
this.fromStart = false;
|
|
28
28
|
}
|
|
29
|
+
/** @zprop */
|
|
29
30
|
perform() {
|
|
30
31
|
if (!this.layerClip)
|
|
31
32
|
return;
|
|
@@ -48,7 +49,7 @@ export class PlayLayerClip extends ActionBehavior {
|
|
|
48
49
|
else
|
|
49
50
|
layerclip.play(opts);
|
|
50
51
|
}
|
|
51
|
-
/** @
|
|
52
|
+
/** @zui */
|
|
52
53
|
preview() {
|
|
53
54
|
this.perform();
|
|
54
55
|
}
|
|
@@ -44,8 +44,9 @@ export declare class PlaySound extends ActionBehavior<PlaySoundProps> {
|
|
|
44
44
|
speed: Observable<number, never>;
|
|
45
45
|
private _component;
|
|
46
46
|
constructor(contextManager: ContextManager, instance: Component, props: PlaySoundProps);
|
|
47
|
-
perform(): void;
|
|
48
47
|
/** @zprop */
|
|
48
|
+
perform(): void;
|
|
49
|
+
/** @zui */
|
|
49
50
|
preview(): void;
|
|
50
51
|
dispose(): never;
|
|
51
52
|
}
|
|
@@ -23,11 +23,12 @@ export class PlaySound extends ActionBehavior {
|
|
|
23
23
|
this.muted = this._component.muted;
|
|
24
24
|
this.volume = this._component.volume;
|
|
25
25
|
}
|
|
26
|
+
/** @zprop */
|
|
26
27
|
perform() {
|
|
27
28
|
this._component.seek(0);
|
|
28
29
|
this._component.play({ speed: this.speed.value });
|
|
29
30
|
}
|
|
30
|
-
/** @
|
|
31
|
+
/** @zui */
|
|
31
32
|
preview() {
|
|
32
33
|
this.perform();
|
|
33
34
|
}
|
|
@@ -14,7 +14,8 @@ export declare class SetLayerOff extends ActionBehavior {
|
|
|
14
14
|
*/
|
|
15
15
|
layer: string | undefined;
|
|
16
16
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
17
|
-
perform(): void;
|
|
18
17
|
/** @zprop */
|
|
18
|
+
perform(): void;
|
|
19
|
+
/** @zui */
|
|
19
20
|
preview(): void;
|
|
20
21
|
}
|
|
@@ -10,6 +10,7 @@ export class SetLayerOff extends ActionBehavior {
|
|
|
10
10
|
super(contextManager, instance, props);
|
|
11
11
|
this.zcomponent = this.getZComponentInstance();
|
|
12
12
|
}
|
|
13
|
+
/** @zprop */
|
|
13
14
|
perform() {
|
|
14
15
|
if (!this.layer)
|
|
15
16
|
return;
|
|
@@ -18,7 +19,7 @@ export class SetLayerOff extends ActionBehavior {
|
|
|
18
19
|
return;
|
|
19
20
|
layer.active = null;
|
|
20
21
|
}
|
|
21
|
-
/** @
|
|
22
|
+
/** @zui */
|
|
22
23
|
preview() {
|
|
23
24
|
this.perform();
|
|
24
25
|
}
|
|
@@ -14,8 +14,9 @@ export declare class ShareSnapshot extends ActionBehavior<ShareCanvasProps> {
|
|
|
14
14
|
/** @zui */
|
|
15
15
|
onShare: Event<[]>;
|
|
16
16
|
constructor(contextManager: ContextManager, instance: Component, props: ShareCanvasProps);
|
|
17
|
+
/** @zprop */
|
|
17
18
|
perform(): void;
|
|
18
19
|
private share;
|
|
19
|
-
/** @
|
|
20
|
+
/** @zui */
|
|
20
21
|
preview(): void;
|
|
21
22
|
}
|
|
@@ -56,8 +56,10 @@ export declare class ShowTextAlert extends ActionBehavior {
|
|
|
56
56
|
classNames: Observable<string[], never>;
|
|
57
57
|
/**
|
|
58
58
|
* How long the alert will apear on the screen
|
|
59
|
+
*
|
|
60
|
+
* @zprop
|
|
59
61
|
*/
|
|
60
62
|
perform(): void;
|
|
61
|
-
/** @
|
|
63
|
+
/** @zui */
|
|
62
64
|
preview(): void;
|
|
63
65
|
}
|
|
@@ -61,6 +61,8 @@ export class ShowTextAlert extends ActionBehavior {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* How long the alert will apear on the screen
|
|
64
|
+
*
|
|
65
|
+
* @zprop
|
|
64
66
|
*/
|
|
65
67
|
perform() {
|
|
66
68
|
showTextAlert(this.contextManager, this.text.value, {
|
|
@@ -70,7 +72,7 @@ export class ShowTextAlert extends ActionBehavior {
|
|
|
70
72
|
timeout: this.timeout.value
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
|
-
/** @
|
|
75
|
+
/** @zui */
|
|
74
76
|
preview() {
|
|
75
77
|
this.perform();
|
|
76
78
|
}
|
|
@@ -90,8 +90,9 @@ export declare class ToggleLayerClips extends ActionBehavior {
|
|
|
90
90
|
easing?: string;
|
|
91
91
|
isA: boolean;
|
|
92
92
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
93
|
-
perform(): void;
|
|
94
93
|
/** @zprop */
|
|
94
|
+
perform(): void;
|
|
95
|
+
/** @zui */
|
|
95
96
|
preview(): void;
|
|
96
97
|
}
|
|
97
98
|
export declare enum Pin {
|
|
@@ -27,6 +27,7 @@ export class ToggleLayerClips extends ActionBehavior {
|
|
|
27
27
|
this.fromStart = false;
|
|
28
28
|
this.isA = true;
|
|
29
29
|
}
|
|
30
|
+
/** @zprop */
|
|
30
31
|
perform() {
|
|
31
32
|
this.isA = !this.isA;
|
|
32
33
|
const opts = {
|
|
@@ -62,7 +63,7 @@ export class ToggleLayerClips extends ActionBehavior {
|
|
|
62
63
|
layerclip.play(opts);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
/** @
|
|
66
|
+
/** @zui */
|
|
66
67
|
preview() {
|
|
67
68
|
this.perform();
|
|
68
69
|
}
|
|
@@ -17,6 +17,9 @@ export declare class PauseStream extends ActionBehavior {
|
|
|
17
17
|
stream: string | undefined;
|
|
18
18
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
19
19
|
perform(): void;
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @zprop
|
|
22
|
+
* @zui
|
|
23
|
+
*/
|
|
21
24
|
preview(): void;
|
|
22
25
|
}
|
|
@@ -39,7 +39,8 @@ export declare class PlayStream extends ActionBehavior {
|
|
|
39
39
|
*/
|
|
40
40
|
fromStart: boolean;
|
|
41
41
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
42
|
-
perform(): void;
|
|
43
42
|
/** @zprop */
|
|
43
|
+
perform(): void;
|
|
44
|
+
/** @zui */
|
|
44
45
|
preview(): void;
|
|
45
46
|
}
|
|
@@ -19,6 +19,7 @@ export class PlayStream extends ActionBehavior {
|
|
|
19
19
|
*/
|
|
20
20
|
this.fromStart = false;
|
|
21
21
|
}
|
|
22
|
+
/** @zprop */
|
|
22
23
|
perform() {
|
|
23
24
|
if (!this.stream)
|
|
24
25
|
return;
|
|
@@ -29,7 +30,7 @@ export class PlayStream extends ActionBehavior {
|
|
|
29
30
|
stream.seek(0);
|
|
30
31
|
stream.play({ loop: this.loop, speed: this.speed });
|
|
31
32
|
}
|
|
32
|
-
/** @
|
|
33
|
+
/** @zui */
|
|
33
34
|
preview() {
|
|
34
35
|
this.perform();
|
|
35
36
|
}
|
|
@@ -24,7 +24,8 @@ export declare class SeekStream extends ActionBehavior {
|
|
|
24
24
|
*/
|
|
25
25
|
time: number;
|
|
26
26
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
27
|
-
perform(): void;
|
|
28
27
|
/** @zprop */
|
|
28
|
+
perform(): void;
|
|
29
|
+
/** @zui */
|
|
29
30
|
preview(): void;
|
|
30
31
|
}
|
|
@@ -18,6 +18,7 @@ export class SeekStream extends ActionBehavior {
|
|
|
18
18
|
*/
|
|
19
19
|
this.time = 0;
|
|
20
20
|
}
|
|
21
|
+
/** @zprop */
|
|
21
22
|
perform() {
|
|
22
23
|
if (!this.stream)
|
|
23
24
|
return;
|
|
@@ -26,7 +27,7 @@ export class SeekStream extends ActionBehavior {
|
|
|
26
27
|
return;
|
|
27
28
|
stream.seek(this.time ?? 0);
|
|
28
29
|
}
|
|
29
|
-
/** @
|
|
30
|
+
/** @zui */
|
|
30
31
|
preview() {
|
|
31
32
|
this.perform();
|
|
32
33
|
}
|
|
@@ -16,7 +16,8 @@ export declare class StopStream extends ActionBehavior {
|
|
|
16
16
|
*/
|
|
17
17
|
stream: string | undefined;
|
|
18
18
|
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
19
|
-
perform(): void;
|
|
20
19
|
/** @zprop */
|
|
20
|
+
perform(): void;
|
|
21
|
+
/** @zui */
|
|
21
22
|
preview(): void;
|
|
22
23
|
}
|
|
@@ -10,6 +10,7 @@ export class StopStream extends ActionBehavior {
|
|
|
10
10
|
super(contextManager, instance, props);
|
|
11
11
|
this.zcomponent = this.getZComponentInstance();
|
|
12
12
|
}
|
|
13
|
+
/** @zprop */
|
|
13
14
|
perform() {
|
|
14
15
|
if (!this.stream)
|
|
15
16
|
return;
|
|
@@ -18,7 +19,7 @@ export class StopStream extends ActionBehavior {
|
|
|
18
19
|
return;
|
|
19
20
|
stream.stop();
|
|
20
21
|
}
|
|
21
|
-
/** @
|
|
22
|
+
/** @zui */
|
|
22
23
|
preview() {
|
|
23
24
|
this.perform();
|
|
24
25
|
}
|
package/lib/component.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare class Component<ElementType = any, ConstructorPropsType extends C
|
|
|
65
65
|
* @group Other
|
|
66
66
|
* @zgrouppriority 0
|
|
67
67
|
*/
|
|
68
|
-
tags: Observable<string[], never>;
|
|
68
|
+
readonly tags: Observable<string[], never>;
|
|
69
69
|
private _updateEnabledResolved;
|
|
70
70
|
private _updateTags;
|
|
71
71
|
dispose(): never;
|
|
@@ -26,12 +26,12 @@ export interface AudioConstructorProps {
|
|
|
26
26
|
* @zstream
|
|
27
27
|
*/
|
|
28
28
|
export declare class Audio extends Component<undefined, AudioConstructorProps> implements Stream {
|
|
29
|
-
/** @zui */ onEnded: Event<[Audio]>;
|
|
30
|
-
/** @zui */ onStop: Event<[Audio]>;
|
|
31
|
-
/** @zui */ onPause: Event<[Audio]>;
|
|
32
|
-
/** @zui */ onPlay: Event<[Audio]>;
|
|
33
|
-
audioContext: AudioContext;
|
|
34
|
-
destination: AudioNode;
|
|
29
|
+
/** @zui */ readonly onEnded: Event<[Audio]>;
|
|
30
|
+
/** @zui */ readonly onStop: Event<[Audio]>;
|
|
31
|
+
/** @zui */ readonly onPause: Event<[Audio]>;
|
|
32
|
+
/** @zui */ readonly onPlay: Event<[Audio]>;
|
|
33
|
+
readonly audioContext: AudioContext;
|
|
34
|
+
readonly destination: AudioNode;
|
|
35
35
|
audioBuffer?: AudioBuffer;
|
|
36
36
|
private _gain;
|
|
37
37
|
private _reversed?;
|
|
@@ -46,7 +46,7 @@ export declare class Audio extends Component<undefined, AudioConstructorProps> i
|
|
|
46
46
|
* @zgroup Audio
|
|
47
47
|
* @zgrouppriority 20
|
|
48
48
|
*/
|
|
49
|
-
muted: Observable<boolean, never>;
|
|
49
|
+
readonly muted: Observable<boolean, never>;
|
|
50
50
|
private _getReversed;
|
|
51
51
|
/**
|
|
52
52
|
* @zprop
|
|
@@ -55,16 +55,28 @@ export declare class Audio extends Component<undefined, AudioConstructorProps> i
|
|
|
55
55
|
* @zgrouppriority 20
|
|
56
56
|
* @zdefault 1
|
|
57
57
|
*/
|
|
58
|
-
volume: Observable<number, never>;
|
|
59
|
-
/**
|
|
58
|
+
readonly volume: Observable<number, never>;
|
|
59
|
+
/**
|
|
60
|
+
* @zprop
|
|
61
|
+
* @zui
|
|
62
|
+
*/
|
|
60
63
|
play(opts?: PlayOptions): void;
|
|
61
64
|
private _pause;
|
|
62
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* @zprop
|
|
67
|
+
* @zui
|
|
68
|
+
*/
|
|
63
69
|
pause(): void;
|
|
64
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* @zprop
|
|
72
|
+
* @zui
|
|
73
|
+
*/
|
|
65
74
|
stop(): void;
|
|
66
|
-
/**
|
|
67
|
-
|
|
75
|
+
/**
|
|
76
|
+
* @zprop
|
|
77
|
+
* @zui
|
|
78
|
+
*/
|
|
79
|
+
seek(/** @ztype time-milliseconds */ t: number): void;
|
|
68
80
|
length(): number | undefined;
|
|
69
81
|
dispose(): never;
|
|
70
82
|
}
|
package/lib/components/Audio.js
CHANGED
|
@@ -68,7 +68,10 @@ export class Audio extends Component {
|
|
|
68
68
|
}
|
|
69
69
|
return this._reversed;
|
|
70
70
|
}
|
|
71
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* @zprop
|
|
73
|
+
* @zui
|
|
74
|
+
*/
|
|
72
75
|
play(opts) {
|
|
73
76
|
if (!this.audioBuffer)
|
|
74
77
|
return;
|
|
@@ -105,19 +108,28 @@ export class Audio extends Component {
|
|
|
105
108
|
this._session.source.disconnect();
|
|
106
109
|
delete this._session;
|
|
107
110
|
}
|
|
108
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* @zprop
|
|
113
|
+
* @zui
|
|
114
|
+
*/
|
|
109
115
|
pause() {
|
|
110
116
|
this._pause();
|
|
111
117
|
this.onPause.emit(this);
|
|
112
118
|
}
|
|
113
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* @zprop
|
|
121
|
+
* @zui
|
|
122
|
+
*/
|
|
114
123
|
stop() {
|
|
115
124
|
this._pause();
|
|
116
125
|
this._playhead = 0;
|
|
117
126
|
this.onStop.emit(this);
|
|
118
127
|
}
|
|
119
|
-
/**
|
|
120
|
-
|
|
128
|
+
/**
|
|
129
|
+
* @zprop
|
|
130
|
+
* @zui
|
|
131
|
+
*/
|
|
132
|
+
seek(/** @ztype time-milliseconds */ t) {
|
|
121
133
|
let previousSession = this._session;
|
|
122
134
|
if (previousSession)
|
|
123
135
|
this._pause();
|