Browse Source

Update canvas content (temporary)

Vijayakrishnan 5 years ago
parent
commit
0357400d39
1 changed files with 6 additions and 7 deletions
  1. 6 7
      resources/views/meet.blade.php

+ 6 - 7
resources/views/meet.blade.php

@@ -96,13 +96,12 @@
                     canvas.height = 480;
                     const ctx = canvas.getContext('2d');
 
-                    // Draw a random colour in the Canvas every 1 second
-                    setInterval(() => {
-                        const x = randomColour();
-                        ctx.clearRect(0, 0, canvas.width, canvas.height);
-                        ctx.fillStyle = `rgb(${x}, ${x}, ${x})`;
-                        ctx.fillRect(0, 0, canvas.width, canvas.height);
-                    }, 500);
+                    const x = randomColour();
+                    ctx.clearRect(0, 0, canvas.width, canvas.height);
+                    ctx.font = "20px Georgia";
+                    ctx.fillStyle = `rgb(220, 220, 220)`;
+                    var userType = '<?= $guest? "Client" : "Pro" ?>';
+                    ctx.fillText("Video feed from the " + userType, 20, 100);
 
                     var self = this;