From 29b4734bc40786a6dfac7edf698c117ff77ab710 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Tue, 25 Jan 2022 01:22:59 +0100 Subject: [PATCH] Adapt typing to TypeScript 4.5.4. --- static/galene.js | 9 ++------- static/protocol.js | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/static/galene.js b/static/galene.js index 46e16aa..51e4b8c 100644 --- a/static/galene.js +++ b/static/galene.js @@ -917,9 +917,9 @@ function Filter(stream, definition) { this.fixedFramerate = false; /** @type {Object} */ this.userdata = {} - - /** @ts-ignore */ + /** @type {MediaStream} */ this.captureStream = this.canvas.captureStream(0); + /** @ts-ignore */ if(!this.captureStream.getTracks()[0].requestFrame) { console.warn('captureFrame not supported, using fixed framerate'); @@ -1141,7 +1141,6 @@ function setUpStream(c, stream) { t.enabled = false; } else if(t.kind == 'video') { if(settings.blackboardMode) { - /** @ts-ignore */ t.contentHint = 'detail'; } } @@ -1344,7 +1343,6 @@ async function addShareMedia() { try { if(!('getDisplayMedia' in navigator.mediaDevices)) throw new Error('Your browser does not support screen sharing'); - /** @ts-ignore */ stream = await navigator.mediaDevices.getDisplayMedia({video: true}); } catch(e) { console.error(e); @@ -1799,13 +1797,10 @@ function registerControlHandlers(localId, media, container) { let pip = getVideoButton(container, 'pip'); if(pip) { - /** @ts-ignore */ if(HTMLVideoElement.prototype.requestPictureInPicture) { pip.onclick = function(e) { e.preventDefault(); - /** @ts-ignore */ if(media.requestPictureInPicture) { - /** @ts-ignore */ media.requestPictureInPicture(); } else { displayWarning('Picture in Picture not supported.'); diff --git a/static/protocol.js b/static/protocol.js index e1864f4..7550801 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -1215,7 +1215,6 @@ Stream.prototype.restartIce = function () { if('restartIce' in c.pc) { try { - /** @ts-ignore */ c.pc.restartIce(); return; } catch(e) {