mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved WebRTC support
This commit is contained in:
parent
92aaf754fb
commit
4106b322d6
16 changed files with 2854 additions and 128 deletions
|
@ -93,15 +93,18 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
obj.ProcessPictureMsg = function (str, X, Y) {
|
||||
//if (obj.targetnode != null) obj.Debug("ProcessPictureMsg " + X + "," + Y + " - " + obj.targetnode.substring(0, 8));
|
||||
var tile = new Image();
|
||||
obj.tilesReceived++;
|
||||
tile.xcount = obj.tilesReceived++;
|
||||
//console.log('Tile #' + tile.xcount);
|
||||
var r = obj.tilesReceived;
|
||||
tile.src = "data:image/jpeg;base64," + btoa(str.substring(4, str.length));
|
||||
tile.onload = function () {
|
||||
//console.log('DecodeTile #' + this.xcount);
|
||||
if (obj.Canvas != null && obj.KillDraw < r && obj.State != 0) {
|
||||
obj.PendingOperations.push([r, 2, tile, X, Y]);
|
||||
while (obj.DoPendingOperations()) { }
|
||||
}
|
||||
}
|
||||
tile.error = function () { console.log('DecodeTileError'); }
|
||||
}
|
||||
|
||||
obj.DoPendingOperations = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue