Don't send manual onStart() if frameproducer's not ready.

This commit is contained in:
Simo Kinnunen
2015-09-14 20:33:29 +09:00
parent 02af21e17c
commit 2ee767ffed

View File

@@ -456,7 +456,16 @@ module.exports = syrup.serial()
})
broadcastSet.on('insert', function(id) {
broadcastSet.get(id).onStart(frameProducer)
// If two clients join a session in the middle, one of them
// may not release the initial size because the projection
// doesn't necessarily change, and the producer doesn't Getting
// restarted. Therefore we have to call onStart() manually
// if the producer is already up and running.
switch (frameProducer.runningState) {
case FrameProducer.STATE_STARTED:
broadcastSet.get(id).onStart(frameProducer)
break
}
})
display.on('rotationChange', function(newRotation) {