@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,6 +1,6 @@
|
|
|
1
|
-
import { a as e, n as t } from "./state-
|
|
2
|
-
import { t as n } from "./pushkin-
|
|
3
|
-
//#region ../player/dist/media-element-error-circuit-breaker-
|
|
1
|
+
import { a as e, n as t } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { t as n } from "./pushkin-C7W2HCqN-BHqS8oLX.js";
|
|
3
|
+
//#region ../player/dist/media-element-error-circuit-breaker-BUJbK6sd.js
|
|
4
4
|
var r = 6e4, i = (e) => {
|
|
5
5
|
console.error("HTMLMediaElement errored", e.target?.error ?? null);
|
|
6
6
|
}, a = () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as e, i as t, n, t as r, u as i } from "./state-
|
|
2
|
-
import { t as a } from "./pushkin-
|
|
3
|
-
import {
|
|
4
|
-
import { t as s } from "./active-device-mode-changed-
|
|
5
|
-
import { t as c } from "./active-device-changed-
|
|
6
|
-
import { n as l, r as u, t as d } from "./basePlayer-
|
|
7
|
-
//#region ../player/dist/nativePlayer-
|
|
1
|
+
import { a as e, i as t, n, t as r, u as i } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { t as a } from "./pushkin-C7W2HCqN-BHqS8oLX.js";
|
|
3
|
+
import { a as o } from "./load-L6Urw8gV-CQAMBwcN.js";
|
|
4
|
+
import { t as s } from "./active-device-mode-changed-OmLVES_4-zwN5exje.js";
|
|
5
|
+
import { t as c } from "./active-device-changed-BDbOSq7P-DQ6vFR_K.js";
|
|
6
|
+
import { n as l, r as u, t as d } from "./basePlayer-D9LFxFnB-BNIKxMHD.js";
|
|
7
|
+
//#region ../player/dist/nativePlayer-DtYpfmo5.js
|
|
8
8
|
var f = "active-device-disconnected";
|
|
9
9
|
function p() {
|
|
10
10
|
return new CustomEvent(f);
|
|
@@ -29,7 +29,7 @@ var m = {
|
|
|
29
29
|
playbackEngineHandlerAttached = !1;
|
|
30
30
|
constructor() {
|
|
31
31
|
super(), i("outputDevicesEnabled") && (async () => {
|
|
32
|
-
g = (await import("./output-devices-
|
|
32
|
+
g = (await import("./output-devices-CPJfYcO--BP7JMB6k.js")).outputDevices, this.#n.listDevices();
|
|
33
33
|
})(), this.#n = window.NativePlayerComponent.Player(), this.playbackState = "IDLE", this.registerEventListeners(), this.#n.setVolume(100);
|
|
34
34
|
}
|
|
35
35
|
#i(t) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e, t } from "./state-
|
|
2
|
-
import { i as n, n as r, r as i, t as a } from "./generate-guid-
|
|
3
|
-
//#region ../player/dist/output-devices-
|
|
1
|
+
import { a as e, t } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { i as n, n as r, r as i, t as a } from "./generate-guid-BMGZjV-R-D16yCCHx.js";
|
|
3
|
+
//#region ../player/dist/output-devices-CPJfYcO-.js
|
|
4
4
|
var o = /* @__PURE__ */ i(((e, t) => {
|
|
5
5
|
t.exports = (function() {
|
|
6
6
|
function e(e, t, n, r, i) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, s as n, t as r, u as i } from "./state-
|
|
2
|
-
//#region ../player/dist/pushkin-
|
|
1
|
+
import { a as e, c as t, s as n, t as r, u as i } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
//#region ../player/dist/pushkin-C7W2HCqN.js
|
|
3
3
|
var a = new class {
|
|
4
4
|
#e;
|
|
5
5
|
#t = !1;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as e, d as t, i as n, n as r, o as i, t as a, u as o } from "./state-
|
|
2
|
-
import { t as s } from "./pushkin-
|
|
3
|
-
import { a as c, i as l, n as u } from "./audio-context-store-
|
|
4
|
-
import { t as d } from "./generate-guid-
|
|
5
|
-
import {
|
|
6
|
-
import { t as _ } from "./active-device-changed-
|
|
7
|
-
import { n as v, r as y, t as b } from "./basePlayer-
|
|
8
|
-
import { t as x } from "./media-element-error-circuit-breaker-
|
|
9
|
-
//#region ../player/dist/shakaPlayer-
|
|
10
|
-
var S = /* @__PURE__ */ d(
|
|
1
|
+
import { a as e, d as t, i as n, n as r, o as i, t as a, u as o } from "./state-BT7sE_jc-iVaBwnBC.js";
|
|
2
|
+
import { t as s } from "./pushkin-C7W2HCqN-BHqS8oLX.js";
|
|
3
|
+
import { a as c, i as l, n as u } from "./audio-context-store-Bf50rcqa-DUuCXOzU.js";
|
|
4
|
+
import { t as d } from "./generate-guid-BMGZjV-R-D16yCCHx.js";
|
|
5
|
+
import { a as f, d as p, n as m, p as h, r as g } from "./load-L6Urw8gV-CQAMBwcN.js";
|
|
6
|
+
import { t as _ } from "./active-device-changed-BDbOSq7P-DQ6vFR_K.js";
|
|
7
|
+
import { n as v, r as y, t as b } from "./basePlayer-D9LFxFnB-BNIKxMHD.js";
|
|
8
|
+
import { t as x } from "./media-element-error-circuit-breaker-BUJbK6sd-DNlFckiw.js";
|
|
9
|
+
//#region ../player/dist/shakaPlayer-CqIY64ST.js
|
|
10
|
+
var S = /* @__PURE__ */ d(m(), 1);
|
|
11
11
|
function C(e) {
|
|
12
12
|
return new CustomEvent("playback-quality-changed", { detail: { playbackContext: e } });
|
|
13
13
|
}
|
|
@@ -36,7 +36,7 @@ function E(t, r) {
|
|
|
36
36
|
actualAudioQuality: w(r),
|
|
37
37
|
bandwidth: r.bandwidth ?? null,
|
|
38
38
|
bitDepth: r.originalAudioId ? T(r.originalAudioId) ?? null : null,
|
|
39
|
-
codec: r.audioCodec ?
|
|
39
|
+
codec: r.audioCodec ? h(r.audioCodec) ?? null : null,
|
|
40
40
|
sampleRate: r.audioSamplingRate ?? null
|
|
41
41
|
};
|
|
42
42
|
n.saveMediaProductTransition(t, {
|
|
@@ -59,7 +59,7 @@ function D(e, t) {
|
|
|
59
59
|
}
|
|
60
60
|
async function O(e, t, n) {
|
|
61
61
|
let r = D(t, n);
|
|
62
|
-
return r.mimeType && r.codecs && await
|
|
62
|
+
return r.mimeType && r.codecs && await f({
|
|
63
63
|
adaptations: [r],
|
|
64
64
|
streamingSessionId: e
|
|
65
65
|
}), r;
|
|
@@ -105,7 +105,7 @@ async function L(e, t) {
|
|
|
105
105
|
let n = e.currentTime;
|
|
106
106
|
if (!j.isPlaying || n === 0) return;
|
|
107
107
|
let r = s.now(), i = j.isSeeking ? "SEEK" : "UNEXPECTED";
|
|
108
|
-
await N(e),
|
|
108
|
+
await N(e), f({
|
|
109
109
|
stalls: [{
|
|
110
110
|
assetPosition: n,
|
|
111
111
|
endTimestamp: s.now(),
|
|
@@ -871,7 +871,7 @@ var V = new Uint8Array([
|
|
|
871
871
|
name = "shakaPlayer";
|
|
872
872
|
constructor() {
|
|
873
873
|
super(), this.playbackState = "IDLE", this.#l = this.#M(), o("outputDevicesEnabled") && (async () => {
|
|
874
|
-
z = (await import("./output-devices-
|
|
874
|
+
z = (await import("./output-devices-CPJfYcO--BP7JMB6k.js")).outputDevices;
|
|
875
875
|
})();
|
|
876
876
|
let e = (e) => {
|
|
877
877
|
if (!e) return !1;
|
|
@@ -1050,11 +1050,11 @@ var V = new Uint8Array([
|
|
|
1050
1050
|
detail: i,
|
|
1051
1051
|
end: "streaming_metrics:drm_license_fetch:endTimestamp",
|
|
1052
1052
|
start: "streaming_metrics:drm_license_fetch:startTimestamp"
|
|
1053
|
-
}),
|
|
1053
|
+
}), f({
|
|
1054
1054
|
cdm: B(t.uri),
|
|
1055
1055
|
cdmVersion: null,
|
|
1056
1056
|
streamingSessionId: i
|
|
1057
|
-
}),
|
|
1057
|
+
}), p([g({
|
|
1058
1058
|
endReason: "COMPLETE",
|
|
1059
1059
|
endTimestamp: s.timestamp("streaming_metrics:drm_license_fetch:endTimestamp"),
|
|
1060
1060
|
errorCode: null,
|
|
@@ -1092,7 +1092,7 @@ var V = new Uint8Array([
|
|
|
1092
1092
|
switch (i.code) {
|
|
1093
1093
|
case S.default.util.Error.Code.LICENSE_REQUEST_FAILED: {
|
|
1094
1094
|
let e = n ? this.preloadedStreamingSessionId ?? this.currentStreamingSessionId : this.currentStreamingSessionId;
|
|
1095
|
-
e &&
|
|
1095
|
+
e && p([g({
|
|
1096
1096
|
endReason: "ERROR",
|
|
1097
1097
|
endTimestamp: s.timestamp("streaming_metrics:drm_license_fetch:endTimestamp"),
|
|
1098
1098
|
errorCode: a,
|
|
@@ -1115,7 +1115,7 @@ var V = new Uint8Array([
|
|
|
1115
1115
|
this.debugLog("Critical error from inactive player, clearing preload:", a), this.#m = !1, this.unloadPreloadedMediaProduct().catch(console.error), e.dispatchError(new r(o ? "PENetwork" : "EUnexpected", a));
|
|
1116
1116
|
return;
|
|
1117
1117
|
}
|
|
1118
|
-
this.playbackState = "STALLED", this.mediaElement && this.mediaElement.pause(), this.currentStreamingSessionId &&
|
|
1118
|
+
this.playbackState = "STALLED", this.mediaElement && this.mediaElement.pause(), this.currentStreamingSessionId && f({
|
|
1119
1119
|
errorCode: a,
|
|
1120
1120
|
errorMessage: JSON.stringify(i),
|
|
1121
1121
|
streamingSessionId: this.currentStreamingSessionId
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../player/dist/state-
|
|
1
|
+
//#region ../player/dist/state-BT7sE_jc.js
|
|
2
2
|
var e = Object.freeze({
|
|
3
3
|
apiUrl: "https://openapi.tidal.com/v2/",
|
|
4
4
|
audioAdaptiveBitrateStreaming: !0,
|
|
@@ -95,7 +95,7 @@ async function l() {
|
|
|
95
95
|
var u = new s(), d = new o();
|
|
96
96
|
async function f() {
|
|
97
97
|
let e = await l(), t = async () => {
|
|
98
|
-
let { Pushkin: e } = await import("./pushkin-
|
|
98
|
+
let { Pushkin: e } = await import("./pushkin-dg1sQNx0-CAPg-zq7.js");
|
|
99
99
|
return e.refresh();
|
|
100
100
|
};
|
|
101
101
|
if (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tidal-music/player-web-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"web-components"
|
|
23
23
|
],
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@vitest/coverage-v8": "4.1.
|
|
26
|
-
"@vitest/ui": "4.1.
|
|
25
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
26
|
+
"@vitest/ui": "4.1.8",
|
|
27
27
|
"typescript": "6.0.3",
|
|
28
|
-
"vite": "8.0.
|
|
29
|
-
"vite-plugin-dts": "5.0.
|
|
30
|
-
"vitest": "4.1.
|
|
28
|
+
"vite": "8.0.16",
|
|
29
|
+
"vite-plugin-dts": "5.0.2",
|
|
30
|
+
"vitest": "4.1.8",
|
|
31
31
|
"@tidal-music/auth": "^1.6.1",
|
|
32
32
|
"@tidal-music/common": "^0.2.1",
|
|
33
33
|
"@tidal-music/player": "^0.18.1",
|
|
34
|
-
"@tidal-music/event-producer": "^2.4.
|
|
34
|
+
"@tidal-music/event-producer": "^2.4.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "vite build",
|