@bizy/core 19.13.6 → 19.13.7
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/fesm2022/bizy-core.mjs
CHANGED
|
@@ -190,6 +190,7 @@ class BizyAudioPlayerComponent {
|
|
|
190
190
|
this.#audioRef = this.#document.getElementById(this.id);
|
|
191
191
|
if (this.#audioRef) {
|
|
192
192
|
this.#audioRef.load();
|
|
193
|
+
this._trackPlayerRate();
|
|
193
194
|
if (this.autoplay) {
|
|
194
195
|
this.#audioRef.play();
|
|
195
196
|
}
|
|
@@ -199,6 +200,7 @@ class BizyAudioPlayerComponent {
|
|
|
199
200
|
this.#audioRef = this.#document.getElementById(this.id);
|
|
200
201
|
if (this.#audioRef) {
|
|
201
202
|
this.#audioRef.load();
|
|
203
|
+
this._trackPlayerRate();
|
|
202
204
|
if (this.autoplay) {
|
|
203
205
|
this.#audioRef.play();
|
|
204
206
|
}
|
|
@@ -213,7 +215,7 @@ class BizyAudioPlayerComponent {
|
|
|
213
215
|
_playbackRate = 1;
|
|
214
216
|
#trackPlaybackRate$ = new Subject();
|
|
215
217
|
#subscription = new Subscription();
|
|
216
|
-
|
|
218
|
+
_trackPlayerRate() {
|
|
217
219
|
this.#subscription.add(this.#trackPlaybackRate$.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
|
218
220
|
this.onTrackPlayerRate.emit(value);
|
|
219
221
|
}));
|
|
@@ -240,15 +242,17 @@ class BizyAudioPlayerComponent {
|
|
|
240
242
|
case 2:
|
|
241
243
|
this.#audioRef.playbackRate = 1;
|
|
242
244
|
this._playbackRate = 1;
|
|
245
|
+
this.#trackPlaybackRate$.next('1');
|
|
243
246
|
break;
|
|
244
247
|
default:
|
|
245
248
|
this.#audioRef.playbackRate = 1;
|
|
246
249
|
this._playbackRate = 1;
|
|
250
|
+
this.#trackPlaybackRate$.next('1');
|
|
247
251
|
}
|
|
248
252
|
}
|
|
249
253
|
}
|
|
250
254
|
_onDownload() {
|
|
251
|
-
if (!this.
|
|
255
|
+
if (this.disabled || !this.showDownload) {
|
|
252
256
|
return;
|
|
253
257
|
}
|
|
254
258
|
const downloadButton = this.#renderer.createElement('a');
|