saltfish 0.3.16 → 0.3.18
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/core/services/StateMachineActionHandler.d.ts +1 -0
- package/dist/core/services/StateMachineActionHandler.d.ts.map +1 -1
- package/dist/core/stateMachineConfig.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/managers/VideoManager.d.ts.map +1 -1
- package/dist/player.js +2 -2
- package/dist/player.min.js +2 -2
- package/dist/saltfish-playlist-player.es.js +23 -3
- package/dist/saltfish-playlist-player.umd.js +1 -1
- package/package.json +1 -1
|
@@ -924,7 +924,8 @@ const playerStateMachineConfig = {
|
|
|
924
924
|
},
|
|
925
925
|
"AUTOPLAY_FALLBACK": { target: "autoplayBlocked" }
|
|
926
926
|
},
|
|
927
|
-
entry: ["logStateEntry", "handleError", "showPlayButton"]
|
|
927
|
+
entry: ["logStateEntry", "handleError", "showPlayButton"],
|
|
928
|
+
exit: ["hideError"]
|
|
928
929
|
},
|
|
929
930
|
"completedWaitingForInteraction": {
|
|
930
931
|
on: {
|
|
@@ -2936,6 +2937,9 @@ class StateMachineActionHandler {
|
|
|
2936
2937
|
handleError: (context) => {
|
|
2937
2938
|
this.handleError(context);
|
|
2938
2939
|
},
|
|
2940
|
+
hideError: () => {
|
|
2941
|
+
this.handleHideError();
|
|
2942
|
+
},
|
|
2939
2943
|
showLoadingState: () => {
|
|
2940
2944
|
this.handleShowLoadingState();
|
|
2941
2945
|
},
|
|
@@ -3219,6 +3223,7 @@ class StateMachineActionHandler {
|
|
|
3219
3223
|
};
|
|
3220
3224
|
this.managers.videoManager.loadVideo(videoUrl).then(() => {
|
|
3221
3225
|
log("StateMachineActionHandler: Video loaded successfully, playing");
|
|
3226
|
+
this.managers.uiManager.hideError();
|
|
3222
3227
|
loadTranscriptForStep();
|
|
3223
3228
|
if (isAudioFallback) {
|
|
3224
3229
|
this.managers.videoManager.startAudioVisualization();
|
|
@@ -3286,6 +3291,7 @@ class StateMachineActionHandler {
|
|
|
3286
3291
|
this.managers.videoManager.hideAudioFallbackOverlay();
|
|
3287
3292
|
}
|
|
3288
3293
|
this.managers.videoManager.loadVideo(videoUrl).then(() => {
|
|
3294
|
+
this.managers.uiManager.hideError();
|
|
3289
3295
|
if (isAudioFallback) {
|
|
3290
3296
|
this.managers.videoManager.startAudioVisualization();
|
|
3291
3297
|
}
|
|
@@ -3335,6 +3341,9 @@ class StateMachineActionHandler {
|
|
|
3335
3341
|
});
|
|
3336
3342
|
}
|
|
3337
3343
|
}
|
|
3344
|
+
handleHideError() {
|
|
3345
|
+
this.managers.uiManager.hideError();
|
|
3346
|
+
}
|
|
3338
3347
|
handleShowLoadingState() {
|
|
3339
3348
|
this.managers.uiManager.showLoading("Loading...");
|
|
3340
3349
|
}
|
|
@@ -5497,7 +5506,10 @@ class VideoManager {
|
|
|
5497
5506
|
*/
|
|
5498
5507
|
__publicField(this, "handleVideoError", (event) => {
|
|
5499
5508
|
const video = event.target;
|
|
5500
|
-
|
|
5509
|
+
const activeVideo = this.getActiveVideo();
|
|
5510
|
+
if (video === activeVideo) {
|
|
5511
|
+
console.error("VideoManager: Video error", video.error);
|
|
5512
|
+
}
|
|
5501
5513
|
});
|
|
5502
5514
|
/**
|
|
5503
5515
|
* Handles video ended event for automatic completion policy
|
|
@@ -11366,7 +11378,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
11366
11378
|
__proto__: null,
|
|
11367
11379
|
SaltfishPlayer
|
|
11368
11380
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11369
|
-
const version = "0.3.
|
|
11381
|
+
const version = "0.3.18";
|
|
11370
11382
|
const packageJson = {
|
|
11371
11383
|
version
|
|
11372
11384
|
};
|
|
@@ -11508,6 +11520,14 @@ function createAPI() {
|
|
|
11508
11520
|
return api;
|
|
11509
11521
|
}
|
|
11510
11522
|
const saltfish = createAPI();
|
|
11523
|
+
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
11524
|
+
if (!document.querySelector('meta[name="saltfish-player-loaded"]')) {
|
|
11525
|
+
const meta = document.createElement("meta");
|
|
11526
|
+
meta.name = "saltfish-player-loaded";
|
|
11527
|
+
meta.content = "true";
|
|
11528
|
+
document.head.appendChild(meta);
|
|
11529
|
+
}
|
|
11530
|
+
}
|
|
11511
11531
|
if (typeof window !== "undefined") {
|
|
11512
11532
|
window.saltfish = saltfish;
|
|
11513
11533
|
}
|