mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-23 22:35:25 +02:00
Don't send manual onStart() if frameproducer's not ready.
This commit is contained in:
@@ -456,7 +456,16 @@ module.exports = syrup.serial()
|
|||||||
})
|
})
|
||||||
|
|
||||||
broadcastSet.on('insert', function(id) {
|
broadcastSet.on('insert', function(id) {
|
||||||
|
// 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)
|
broadcastSet.get(id).onStart(frameProducer)
|
||||||
|
break
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
display.on('rotationChange', function(newRotation) {
|
display.on('rotationChange', function(newRotation) {
|
||||||
|
|||||||
Reference in New Issue
Block a user