Skip to content

Commit

Permalink
fix: do not clear elements and engines when going rehearsal<->active
Browse files Browse the repository at this point in the history
  • Loading branch information
ianshade committed Apr 12, 2021
1 parent 587b795 commit 09bf843
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/devices/vizMSE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ export class VizMSEDevice extends DeviceWithState<VizMSEState> implements IDevic
* @param okToDestroyStuff Whether it is OK to do things that affects playout visibly
*/
async makeReady (okToDestroyStuff?: boolean, activeRundownPlaylistId?: string): Promise<void> {
const previousPlaylistId = this._vizmseManager?.activeRundownPlaylistId
if (this._vizmseManager) {
const preload = !!(this._initOptions && this._initOptions.onlyPreloadActiveRundown)
await this._vizmseManager.activate(activeRundownPlaylistId, preload)
Expand All @@ -348,7 +349,8 @@ export class VizMSEDevice extends DeviceWithState<VizMSEState> implements IDevic
if (this._vizmseManager) {
if (
this._initOptions &&
this._initOptions.clearAllOnMakeReady
this._initOptions.clearAllOnMakeReady &&
activeRundownPlaylistId !== previousPlaylistId
) {
if (this._initOptions.clearAllTemplateName) {
await this._vizmseManager.clearAll({
Expand Down Expand Up @@ -784,6 +786,10 @@ class VizMSEManager extends EventEmitter {
private _activeRundownPlaylistId: string | undefined
private _preloadedRundownPlaylistId: string | undefined

public get activeRundownPlaylistId () {
return this._activeRundownPlaylistId
}

constructor (
private _parentVizMSEDevice: VizMSEDevice,
private _vizMSE: MSE,
Expand Down

0 comments on commit 09bf843

Please sign in to comment.