@mottosports/motto-video-player 1.0.1-rc.8 → 1.0.1-rc.9
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/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import "shaka-player/dist/controls.css";
|
|
5
|
+
|
|
3
6
|
// #style-inject:#style-inject
|
|
4
7
|
function styleInject(css, { insertAt } = {}) {
|
|
5
8
|
if (!css || typeof document === "undefined") return;
|
|
@@ -62,6 +65,9 @@ var useShakePlayer = ({
|
|
|
62
65
|
}
|
|
63
66
|
player.addEventListener("error", (event) => {
|
|
64
67
|
const error = event.detail;
|
|
68
|
+
if (error?.code === 7e3) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
65
71
|
console.error("Shaka Player Error:", error);
|
|
66
72
|
onError?.(new Error(`Shaka Player Error: ${error.message || "Unknown error"}`));
|
|
67
73
|
});
|
|
@@ -69,6 +75,9 @@ var useShakePlayer = ({
|
|
|
69
75
|
onPlayerReady?.(player);
|
|
70
76
|
return player;
|
|
71
77
|
} catch (error) {
|
|
78
|
+
if (error?.code === 7e3) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
72
81
|
console.error("Error initializing Shaka Player:", error);
|
|
73
82
|
onError?.(error);
|
|
74
83
|
throw error;
|