mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-08 06:28:29 +01:00
Send only ready when we finish rendering the received frame
This commit is contained in:
parent
90382e2f33
commit
fc515ff012
File diff suppressed because one or more lines are too long
@ -149,12 +149,15 @@ class WVNC
|
||||
|
||||
process: (msg) ->
|
||||
if not @socket
|
||||
@socket.send(@buildCommand 0x04, 1)
|
||||
return
|
||||
data = new Uint8Array msg.pixels
|
||||
ctx = @canvas.getContext "2d", { alpha: false }
|
||||
imgData = ctx.createImageData msg.w, msg.h
|
||||
imgData.data.set data
|
||||
ctx.putImageData imgData,msg.x, msg.y
|
||||
# tell the server that we are ready
|
||||
@socket.send(@buildCommand 0x04, 1)
|
||||
|
||||
|
||||
setScale: (n) ->
|
||||
@ -329,7 +332,6 @@ class WVNC
|
||||
when 0x84
|
||||
# send data to web assembly for decoding
|
||||
@decoder.postMessage data.buffer, [data.buffer]
|
||||
@socket.send(@buildCommand 0x04, 1)
|
||||
when 0x85
|
||||
# clipboard data from server
|
||||
data = data.subarray 1
|
||||
|
Loading…
Reference in New Issue
Block a user