@raydiant/playlist-window-manager 0.23.0 → 0.23.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.
|
@@ -894,7 +894,7 @@ var PlaylistWindowManager = /** @class */ (function (_super) {
|
|
|
894
894
|
};
|
|
895
895
|
PlaylistWindowManager.prototype.swapWindows = function () {
|
|
896
896
|
return __awaiter(this, void 0, void 0, function () {
|
|
897
|
-
var nextPreviewPresentationId, preview, result, shouldPreload;
|
|
897
|
+
var nextPreviewPresentationId, preview, result, nextPresentation, shouldPreload;
|
|
898
898
|
return __generator(this, function (_a) {
|
|
899
899
|
switch (_a.label) {
|
|
900
900
|
case 0:
|
|
@@ -910,6 +910,7 @@ var PlaylistWindowManager = /** @class */ (function (_super) {
|
|
|
910
910
|
preview = result.preview;
|
|
911
911
|
nextPreviewPresentationId = preview.presentationId;
|
|
912
912
|
}
|
|
913
|
+
nextPresentation = this.nextPresentation;
|
|
913
914
|
// Set this.currentPresentationId before removing the current window to avoid timing issues with previewCheck
|
|
914
915
|
// triggering during removeCurrentWindow. Current presentation id needs to be set to the next
|
|
915
916
|
// presentation before calling shouldPreload().
|
|
@@ -939,6 +940,11 @@ var PlaylistWindowManager = /** @class */ (function (_super) {
|
|
|
939
940
|
// Swap windows.
|
|
940
941
|
this.currentWindow = this.nextWindow;
|
|
941
942
|
if (this.currentWindow) {
|
|
943
|
+
// Restore this.currentPresentation value since if this.removeCurrentWindow()
|
|
944
|
+
// was called then this.currentPresentation was set to null.
|
|
945
|
+
// This fixes an issue where publishing a playlist with single presentation results
|
|
946
|
+
// in two iFrames created. See CX-2602 for more details.
|
|
947
|
+
this.currentPresentation = nextPresentation;
|
|
942
948
|
this.currentWindow.onComplete(this.handleCurrentPresentationComplete);
|
|
943
949
|
this.currentWindow.onError(this.handleCurrentPresentationError);
|
|
944
950
|
this.currentWindow.onEnableInterruptLock(this.handleEnableInterruptLock);
|
package/package.json
CHANGED
|
@@ -698,6 +698,9 @@ export default class PlaylistWindowManager extends EventEmitter {
|
|
|
698
698
|
nextPreviewPresentationId = preview.presentationId;
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
+
// Save reference to next presentation since later call to
|
|
702
|
+
// this.removeCurrentWindow() will set this.currentPresentation to null.
|
|
703
|
+
const nextPresentation = this.nextPresentation;
|
|
701
704
|
// Set this.currentPresentationId before removing the current window to avoid timing issues with previewCheck
|
|
702
705
|
// triggering during removeCurrentWindow. Current presentation id needs to be set to the next
|
|
703
706
|
// presentation before calling shouldPreload().
|
|
@@ -734,6 +737,11 @@ export default class PlaylistWindowManager extends EventEmitter {
|
|
|
734
737
|
// Swap windows.
|
|
735
738
|
this.currentWindow = this.nextWindow;
|
|
736
739
|
if (this.currentWindow) {
|
|
740
|
+
// Restore this.currentPresentation value since if this.removeCurrentWindow()
|
|
741
|
+
// was called then this.currentPresentation was set to null.
|
|
742
|
+
// This fixes an issue where publishing a playlist with single presentation results
|
|
743
|
+
// in two iFrames created. See CX-2602 for more details.
|
|
744
|
+
this.currentPresentation = nextPresentation;
|
|
737
745
|
this.currentWindow.onComplete(this.handleCurrentPresentationComplete);
|
|
738
746
|
this.currentWindow.onError(this.handleCurrentPresentationError);
|
|
739
747
|
this.currentWindow.onEnableInterruptLock(this.handleEnableInterruptLock);
|