clear all presentation pods on reconnect for safety

This commit is contained in:
Chad Pilkey 2017-12-18 18:49:41 -05:00
parent 5bb13dedbf
commit af96e27b71
2 changed files with 18 additions and 0 deletions

View File

@ -115,6 +115,15 @@ package org.bigbluebutton.modules.present.managers
public function handleGetAllPodsRespEvent(e: GetAllPodsRespEvent): void {
var podsAC:ArrayCollection = e.pods as ArrayCollection;
// For now the best option for cleaning up old pods is to just delete everything we
// know about. In the future we'll want to update existing pods to a new state
// rather than recreating.
var activePodIds:Array = podsManager.getAllPodIds();
for (var i:int=0; i<activePodIds.length; i++) {
handlePresentationPodRemovedHelper(activePodIds[i]);
}
podsManager.handleGetAllPodsResp(podsAC);
}

View File

@ -80,6 +80,15 @@ package org.bigbluebutton.modules.present.model {
var pod: PresentationModel = getPod(DEFAULT_POD_ID);
return pod;
}
public function getAllPodIds():Array {
var podIds:Array = [];
for (var i:int = 0; i < _presentationPods.length; i++) {
var pod: PresentationModel = _presentationPods.getItemAt(i) as PresentationModel;
podIds.push(pod.getPodId())
}
return podIds;
}
public function handleAddPresentationPod(podId: String): void {
for (var i:int = 0; i < _presentationPods.length; i++) {