Add indicator to show the smallest screen participating

This commit is contained in:
raphael
2019-05-07 08:36:42 +02:00
parent b839fd66fa
commit 31f0b7349e
4 changed files with 66 additions and 8 deletions

View File

@@ -33,7 +33,11 @@ signaling_socket.on('connect', function () {
alert("Access denied! Wrong accessToken!")
});
signaling_socket.emit('joinWhiteboard', { wid: whiteboardId, at: accessToken });
signaling_socket.on('updateSmallestScreenResolution', function (widthHeight) {
whiteboard.updateSmallestScreenResolution(widthHeight["w"], widthHeight["h"]);
});
signaling_socket.emit('joinWhiteboard', { wid: whiteboardId, at: accessToken, windowWidthHeight: { w: $(window).width(), h: $(window).height() } });
});
$(document).ready(function () {
@@ -51,6 +55,11 @@ $(document).ready(function () {
whiteboard.loadData(data)
});
$(window).resize(function () {
console.log("CHANGED!");
signaling_socket.emit('updateScreenResolution', { at: accessToken, windowWidthHeight: { w: $(window).width(), h: $(window).height() } });
})
/*----------------/
Whiteboard actions
/----------------*/
@@ -120,7 +129,7 @@ $(document).ready(function () {
alert("Please drag the image into the browser.");
});
// save image to png
// save image as png
$("#saveAsImageBtn").click(function () {
var imgData = whiteboard.getImageDataBase64();