@tidal-music/player-web-components 0.2.2 → 0.3.0
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/{active-device-changed-DKzZonX1--oMxdziu.js → active-device-changed-BDbOSq7P-DQ6vFR_K.js} +1 -1
- package/dist/{active-device-mode-changed-Dj16yzUX-BbRjSd-6.js → active-device-mode-changed-OmLVES_4-zwN5exje.js} +1 -1
- package/dist/{audio-context-store-Ccv6WKna-C-yxIXdl.js → audio-context-store-Bf50rcqa-DUuCXOzU.js} +1 -1
- package/dist/{basePlayer-CxowZx76-CfK9Qp4M.js → basePlayer-D9LFxFnB-BNIKxMHD.js} +17 -17
- package/dist/{browserPlayer-CJUIZMXc-Cwz_EqKS.js → browserPlayer-BzBNrx-C-DjxeaFTq.js} +5 -5
- package/dist/{generate-guid-DMif1b6n-WXvDGKGF.js → generate-guid-BMGZjV-R-D16yCCHx.js} +1 -1
- package/dist/index.js +12 -7
- package/dist/{load-D2Tka_Qx-BNIMgt7e.js → load-L6Urw8gV-CQAMBwcN.js} +8047 -7909
- package/dist/{media-element-error-circuit-breaker-fMDQ6k4B-B9oZKZUK.js → media-element-error-circuit-breaker-BUJbK6sd-DNlFckiw.js} +3 -3
- package/dist/{nativePlayer-Bk8Y048r-S6bg9D6D.js → nativePlayer-DtYpfmo5-nNN5yO4E.js} +8 -8
- package/dist/{output-devices-kF_iC6GM-CnAUEjc9.js → output-devices-CPJfYcO--BP7JMB6k.js} +3 -3
- package/dist/{pushkin-BJAKy5lP-BDJR20nC.js → pushkin-C7W2HCqN-BHqS8oLX.js} +2 -2
- package/dist/pushkin-dg1sQNx0-CAPg-zq7.js +2 -0
- package/dist/{shakaPlayer-BvtoIIdC-CizBy6it.js → shakaPlayer-CqIY64ST-BhwOXSvi.js} +18 -18
- package/dist/{state-B888KJag-C7pa4Xs7.js → state-BT7sE_jc-iVaBwnBC.js} +2 -2
- package/package.json +7 -7
- package/dist/pushkin-CVLqA7Zj-DJu6_unL.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, i as t, l as n, o as r, t as i, u as a } from "./state-
|
|
2
|
-
import { t as o } from "./pushkin-
|
|
3
|
-
import { a as s, c, d as l, f as u,
|
|
4
|
-
//#region ../player/dist/basePlayer-
|
|
1
|
+
import { a as e, i as t, l as n, o as r, t as i, u as a } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { t as o } from "./pushkin-C7W2HCqN-BHqS8oLX.js";
|
|
3
|
+
import { a as s, c, d as l, f as u, i as d, l as f, o as p, s as m, t as h, u as g } from "./load-L6Urw8gV-CQAMBwcN.js";
|
|
4
|
+
//#region ../player/dist/basePlayer-D9LFxFnB.js
|
|
5
5
|
function _(e, t) {
|
|
6
6
|
return new CustomEvent("media-product-transition", { detail: {
|
|
7
7
|
mediaProduct: e,
|
|
@@ -149,15 +149,15 @@ var O = class {
|
|
|
149
149
|
}
|
|
150
150
|
eventTrackingStreamingEnded(e, { endAssetPosition: t, endReason: n }) {
|
|
151
151
|
let r = o.now();
|
|
152
|
-
|
|
152
|
+
u([d({
|
|
153
153
|
endAssetPosition: t,
|
|
154
154
|
endTimestamp: r,
|
|
155
155
|
streamingSessionId: e
|
|
156
|
-
})]).catch(console.error),
|
|
156
|
+
})]).catch(console.error), l([s({
|
|
157
157
|
endReason: D(n),
|
|
158
158
|
endTimestamp: r,
|
|
159
159
|
streamingSessionId: e
|
|
160
|
-
}),
|
|
160
|
+
}), g({
|
|
161
161
|
streamingSessionId: e,
|
|
162
162
|
timestamp: r
|
|
163
163
|
})]).catch(console.error);
|
|
@@ -173,7 +173,7 @@ var O = class {
|
|
|
173
173
|
start: "streaming_metrics:playback_statistics:idealStartTimestamp"
|
|
174
174
|
});
|
|
175
175
|
try {
|
|
176
|
-
|
|
176
|
+
s({
|
|
177
177
|
actualStartTimestamp: o.timestamp("streaming_metrics:playback_statistics:actualStartTimestamp", e),
|
|
178
178
|
idealStartTimestamp: o.timestamp("streaming_metrics:playback_statistics:idealStartTimestamp", e),
|
|
179
179
|
outputDevice: this.#i,
|
|
@@ -190,15 +190,15 @@ var O = class {
|
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
let { mediaProduct: r, playbackContext: i } = n, a = o.now();
|
|
193
|
-
|
|
193
|
+
d({
|
|
194
194
|
actualAssetPresentation: i.actualAssetPresentation,
|
|
195
195
|
actualAudioMode: "actualAudioMode" in i ? i.actualAudioMode : null,
|
|
196
196
|
actualProductId: i.actualProductId,
|
|
197
197
|
actualQuality: i.actualAudioQuality || i.actualVideoQuality,
|
|
198
198
|
extras: r.extras,
|
|
199
|
-
isPostPaywall:
|
|
199
|
+
isPostPaywall: p(i.actualAssetPresentation, r),
|
|
200
200
|
playbackSessionId: e,
|
|
201
|
-
productType:
|
|
201
|
+
productType: f(r.productType),
|
|
202
202
|
requestedProductId: r.productId,
|
|
203
203
|
sourceId: r.sourceId,
|
|
204
204
|
sourceType: r.sourceType,
|
|
@@ -225,7 +225,7 @@ var O = class {
|
|
|
225
225
|
return 0;
|
|
226
226
|
}
|
|
227
227
|
async hardReload(e, t) {
|
|
228
|
-
return this.currentStreamingSessionId && this.finishCurrentMediaProduct("skip"),
|
|
228
|
+
return this.currentStreamingSessionId && this.finishCurrentMediaProduct("skip"), m(e, t);
|
|
229
229
|
}
|
|
230
230
|
hasNextItem() {
|
|
231
231
|
return this.preloadedStreamingSessionId;
|
|
@@ -253,7 +253,7 @@ var O = class {
|
|
|
253
253
|
if (this.preloadedStreamingSessionId) return t.getMediaProductTransition(this.preloadedStreamingSessionId);
|
|
254
254
|
}
|
|
255
255
|
set outputDeviceType(e) {
|
|
256
|
-
this.#i = e ?
|
|
256
|
+
this.#i = e ? c(e) : void 0;
|
|
257
257
|
}
|
|
258
258
|
overwriteMediaProduct(e, n) {
|
|
259
259
|
let r = t.getMediaProductTransition(e);
|
|
@@ -285,7 +285,7 @@ var O = class {
|
|
|
285
285
|
case r("IDLE", "STALLED"): return;
|
|
286
286
|
case r("PLAYING", "NOT_PLAYING"):
|
|
287
287
|
case r("PLAYING", "IDLE"):
|
|
288
|
-
this.duration && this.currentTime < this.duration &&
|
|
288
|
+
this.duration && this.currentTime < this.duration && h(this.currentStreamingSessionId, {
|
|
289
289
|
actionType: "PLAYBACK_STOP",
|
|
290
290
|
assetPosition: this.currentTime,
|
|
291
291
|
timestamp: o.now()
|
|
@@ -293,7 +293,7 @@ var O = class {
|
|
|
293
293
|
break;
|
|
294
294
|
case r("IDLE", "PLAYING"):
|
|
295
295
|
case r("NOT_PLAYING", "PLAYING"):
|
|
296
|
-
this.currentTime !== this.startAssetPosition &&
|
|
296
|
+
this.currentTime !== this.startAssetPosition && h(this.currentStreamingSessionId, {
|
|
297
297
|
actionType: "PLAYBACK_START",
|
|
298
298
|
assetPosition: this.currentTime,
|
|
299
299
|
timestamp: o.now()
|
|
@@ -324,7 +324,7 @@ var O = class {
|
|
|
324
324
|
seekEnd(t) {
|
|
325
325
|
let n = this.currentStreamingSessionId;
|
|
326
326
|
if (n) {
|
|
327
|
-
let r = () =>
|
|
327
|
+
let r = () => h(n, {
|
|
328
328
|
actionType: "PLAYBACK_START",
|
|
329
329
|
assetPosition: t,
|
|
330
330
|
timestamp: o.now()
|
|
@@ -339,7 +339,7 @@ var O = class {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
seekStart(e) {
|
|
342
|
-
this.currentStreamingSessionId &&
|
|
342
|
+
this.currentStreamingSessionId && h(this.currentStreamingSessionId, {
|
|
343
343
|
actionType: "PLAYBACK_STOP",
|
|
344
344
|
assetPosition: e,
|
|
345
345
|
timestamp: o.now()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, u as r } from "./state-
|
|
2
|
-
import { a as i, n as a } from "./audio-context-store-
|
|
3
|
-
import { n as o, r as s, t as c } from "./basePlayer-
|
|
4
|
-
import { t as l } from "./media-element-error-circuit-breaker-
|
|
5
|
-
//#region ../player/dist/browserPlayer-
|
|
1
|
+
import { a as e, i as t, o as n, u as r } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { a as i, n as a } from "./audio-context-store-Bf50rcqa-DUuCXOzU.js";
|
|
3
|
+
import { n as o, r as s, t as c } from "./basePlayer-D9LFxFnB-BNIKxMHD.js";
|
|
4
|
+
import { t as l } from "./media-element-error-circuit-breaker-BUJbK6sd-DNlFckiw.js";
|
|
5
|
+
//#region ../player/dist/browserPlayer-BzBNrx-C.js
|
|
6
6
|
var u = class extends c {
|
|
7
7
|
#e;
|
|
8
8
|
#t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../player/dist/generate-guid-
|
|
1
|
+
//#region ../player/dist/generate-guid-BMGZjV-R.js
|
|
2
2
|
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
3
|
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
4
|
get: ((e) => i[e]).bind(null, d),
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, d as t, i as n, r, t as i } from "./state-
|
|
2
|
-
import { t as a } from "./pushkin-
|
|
3
|
-
import { r as o, t as s } from "./audio-context-store-
|
|
4
|
-
import {
|
|
1
|
+
import { a as e, d as t, i as n, r, t as i } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { t as a } from "./pushkin-C7W2HCqN-BHqS8oLX.js";
|
|
3
|
+
import { r as o, t as s } from "./audio-context-store-Bf50rcqa-DUuCXOzU.js";
|
|
4
|
+
import { s as c } from "./load-L6Urw8gV-CQAMBwcN.js";
|
|
5
5
|
//#region ../player/dist/index.js
|
|
6
6
|
function l() {
|
|
7
7
|
return i.activePlayer?.getPosition() ?? 0;
|
|
@@ -162,14 +162,18 @@ var O = "tidal-play-trigger", k = class extends HTMLElement {
|
|
|
162
162
|
}, this.#i();
|
|
163
163
|
}
|
|
164
164
|
static get observedAttributes() {
|
|
165
|
-
return [
|
|
165
|
+
return [
|
|
166
|
+
"product-id",
|
|
167
|
+
"product-type",
|
|
168
|
+
"share-code"
|
|
169
|
+
];
|
|
166
170
|
}
|
|
167
171
|
async #n() {
|
|
168
172
|
await this.#r(), f() === "PLAYING" ? p() : await m();
|
|
169
173
|
}
|
|
170
174
|
#r() {
|
|
171
|
-
let e = u()
|
|
172
|
-
if (
|
|
175
|
+
let e = u(), t = this.mediaProduct;
|
|
176
|
+
if (t && (e?.productId !== t.productId || e?.productType !== t.productType || e?.shareCode !== t.shareCode)) return c(t, 0);
|
|
173
177
|
}
|
|
174
178
|
#i() {
|
|
175
179
|
this.#t || this.addEventListener("click", this.#e, { passive: !0 });
|
|
@@ -195,6 +199,7 @@ var O = "tidal-play-trigger", k = class extends HTMLElement {
|
|
|
195
199
|
if (e) return {
|
|
196
200
|
productId: e,
|
|
197
201
|
productType: this.getAttribute("product-type") === "video" ? "video" : "track",
|
|
202
|
+
shareCode: this.getAttribute("share-code")?.trim() || void 0,
|
|
198
203
|
sourceId: "",
|
|
199
204
|
sourceType: ""
|
|
200
205
|
};
|