saltfish 0.2.79 → 0.3.1
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/managers/AudioVisualizationManager.d.ts +6 -0
- package/dist/managers/AudioVisualizationManager.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 +19 -1
- package/dist/saltfish-playlist-player.umd.js +1 -1
- package/package.json +1 -1
|
@@ -5026,13 +5026,16 @@ class AudioVisualizationManager {
|
|
|
5026
5026
|
this.zeroDataFrameCount = 0;
|
|
5027
5027
|
}
|
|
5028
5028
|
if (this.videoElement1 === videoElement) {
|
|
5029
|
+
this.resumeAudioContext();
|
|
5029
5030
|
this.switchToSource(this.sourceVideo1);
|
|
5030
5031
|
return;
|
|
5031
5032
|
}
|
|
5032
5033
|
if (this.videoElement2 === videoElement) {
|
|
5034
|
+
this.resumeAudioContext();
|
|
5033
5035
|
this.switchToSource(this.sourceVideo2);
|
|
5034
5036
|
return;
|
|
5035
5037
|
}
|
|
5038
|
+
this.resumeAudioContext();
|
|
5036
5039
|
const newSource = this.audioContext.createMediaElementSource(videoElement);
|
|
5037
5040
|
if (!this.videoElement1) {
|
|
5038
5041
|
this.videoElement1 = videoElement;
|
|
@@ -5225,6 +5228,18 @@ class AudioVisualizationManager {
|
|
|
5225
5228
|
resume() {
|
|
5226
5229
|
this.isPaused = false;
|
|
5227
5230
|
}
|
|
5231
|
+
/**
|
|
5232
|
+
* Resumes the AudioContext if it's suspended
|
|
5233
|
+
* Safe to call multiple times - will only resume if needed
|
|
5234
|
+
* MUST be called after user interaction for audio to work
|
|
5235
|
+
*/
|
|
5236
|
+
resumeAudioContext() {
|
|
5237
|
+
if (this.audioContext && this.audioContext.state === "suspended") {
|
|
5238
|
+
this.audioContext.resume().catch((error2) => {
|
|
5239
|
+
console.warn("AudioVisualizationManager: Failed to resume AudioContext", error2);
|
|
5240
|
+
});
|
|
5241
|
+
}
|
|
5242
|
+
}
|
|
5228
5243
|
/**
|
|
5229
5244
|
* Checks if visualization is currently initialized
|
|
5230
5245
|
*/
|
|
@@ -5686,6 +5701,9 @@ class VideoManager {
|
|
|
5686
5701
|
}
|
|
5687
5702
|
}
|
|
5688
5703
|
activeVideo.loop = false;
|
|
5704
|
+
if (this.audioVisualizationManager.getIsInitialized()) {
|
|
5705
|
+
this.audioVisualizationManager.resumeAudioContext();
|
|
5706
|
+
}
|
|
5689
5707
|
if (!activeVideo.paused) {
|
|
5690
5708
|
if (this.controls) {
|
|
5691
5709
|
this.controls.startProgressTracking();
|
|
@@ -11197,7 +11215,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
11197
11215
|
__proto__: null,
|
|
11198
11216
|
SaltfishPlayer
|
|
11199
11217
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11200
|
-
const version = "0.
|
|
11218
|
+
const version = "0.3.1";
|
|
11201
11219
|
const packageJson = {
|
|
11202
11220
|
version
|
|
11203
11221
|
};
|