Limit VNC size by default.

This commit is contained in:
Simo Kinnunen
2015-09-15 04:25:21 +09:00
parent d5bfcb16d4
commit 9d20484dcb
5 changed files with 29 additions and 5 deletions

View File

@@ -25,7 +25,6 @@ module.exports = syrup.serial()
.dependency(require('./options'))
.define(function(options, adb, minicap, display, screenOptions) {
var log = logger.createLogger('device:plugins:screen:stream')
var plugin = Object.create(null)
function FrameProducer(config) {
EventEmitter.call(this)
@@ -443,9 +442,9 @@ module.exports = syrup.serial()
return createServer()
.then(function(wss) {
var broadcastSet = plugin.broadcastSet = new BroadcastSet()
var frameProducer = new FrameProducer(
new FrameConfig(display.properties, display.properties))
var broadcastSet = frameProducer.broadcastSet = new BroadcastSet()
broadcastSet.on('nonempty', function() {
frameProducer.start()
@@ -589,6 +588,7 @@ module.exports = syrup.serial()
lifecycle.observe(function() {
frameProducer.stop()
})
return frameProducer
})
.return(plugin)
})