@zcomponent/core 1.4.0-beta → 1.4.1-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.
|
@@ -33,15 +33,15 @@ export declare class Audio extends Component<undefined, AudioConstructorProps> i
|
|
|
33
33
|
private _playhead;
|
|
34
34
|
private _rate;
|
|
35
35
|
private _session?;
|
|
36
|
+
constructor(mgr: ContextManager, props: AudioConstructorProps);
|
|
37
|
+
private _load;
|
|
38
|
+
private _updateVolume;
|
|
36
39
|
/** @zprop
|
|
37
40
|
* @zdefault false
|
|
38
41
|
* @zgroup Audio
|
|
39
42
|
* @zgrouppriority 20
|
|
40
43
|
*/
|
|
41
44
|
muted: Observable<boolean, never>;
|
|
42
|
-
constructor(mgr: ContextManager, props: AudioConstructorProps);
|
|
43
|
-
private _load;
|
|
44
|
-
private _updateVolume;
|
|
45
45
|
private _getReversed;
|
|
46
46
|
/**
|
|
47
47
|
* @zprop
|
package/lib/components/Audio.js
CHANGED
|
@@ -15,15 +15,15 @@ export class Audio extends Component {
|
|
|
15
15
|
super(mgr, props);
|
|
16
16
|
this._playhead = 0;
|
|
17
17
|
this._rate = 1;
|
|
18
|
+
this._updateVolume = () => {
|
|
19
|
+
this._gain.gain.value = this.muted.value === true ? 0 : this.volume.value;
|
|
20
|
+
};
|
|
18
21
|
/** @zprop
|
|
19
22
|
* @zdefault false
|
|
20
23
|
* @zgroup Audio
|
|
21
24
|
* @zgrouppriority 20
|
|
22
25
|
*/
|
|
23
|
-
this.muted = new Observable(false);
|
|
24
|
-
this._updateVolume = () => {
|
|
25
|
-
this._gain.gain.value = this.muted.value === true ? 0 : this.volume.value;
|
|
26
|
-
};
|
|
26
|
+
this.muted = new Observable(false, this._updateVolume);
|
|
27
27
|
/**
|
|
28
28
|
* @zprop
|
|
29
29
|
* @ztype proportion
|