From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass (mailfrom) smtp.mailfrom=irif.fr (client-ip=2001:660:3301:8000::1:2; helo=korolev.univ-paris7.fr; envelope-from=jch@irif.fr; receiver=) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=irif.fr header.i=@irif.fr header.a=rsa-sha256 header.s=dkim-irif header.b=K5Ob7wXp Received: from korolev.univ-paris7.fr (korolev.univ-paris7.fr [IPv6:2001:660:3301:8000::1:2]) by mail.toke.dk (Postfix) with ESMTPS id 7E2AEA67FCF for ; Sun, 5 May 2024 22:47:54 +0200 (CEST) Received: from mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [81.194.30.253]) by korolev.univ-paris7.fr (8.14.4/8.14.4/relay1/82085) with ESMTP id 445KlrNM030790; Sun, 5 May 2024 22:47:53 +0200 Received: from mailhub.math.univ-paris-diderot.fr (localhost [127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTP id C802E55416; Sun, 5 May 2024 22:47:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=irif.fr; h= content-type:content-type:mime-version:user-agent:references :in-reply-to:subject:subject:from:from:message-id:date:date :received:received; s=dkim-irif; t=1714942071; x=1715806072; bh= ejxQfZiETI5IChw6u0KuwWQq/VHpq0cIS7v5EKh7B0U=; b=K5Ob7wXp0bXep3OQ 08IuCZCbUDDHfjKFfN75dv7bm+rQv6PryxCiVxLAe2hrge0Qg6JL7bStIYzPiIzW Qq4LmO261vu0Won+XAuli0O1328g0+oxzWebQ0uCphttIhisa/hxM0n+r2UsjFv8 cYJ8/XyjXgbyltRia8rxmod4Hn2x6y2iVGV0PurRxLDycXQdKNFH+tunfuJEjrcK uLnQOJZoSGuOUobx2cmo2IRAdbPiCqXx94lfRiVb9IcdbLYhkPBkRTTSXAZYmGTs RArXJRjjhhCW+j3HjOBLnNGmeqMhmgNdQsruhQ41jr912zo9tAnm3lXsXFfc6uT8 XaKPlw== X-Virus-Scanned: amavisd-new at math.univ-paris-diderot.fr Received: from mailhub.math.univ-paris-diderot.fr ([127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 444PND0G6H83; Sun, 5 May 2024 22:47:51 +0200 (CEST) Received: from pirx.irif.fr (82-64-141-196.subs.proxad.net [82.64.141.196]) (Authenticated sender: jch) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTPSA id C573E551F5; Sun, 5 May 2024 22:47:50 +0200 (CEST) Date: Sun, 05 May 2024 22:47:47 +0200 Message-ID: <87ikzsdlzg.wl-jch@irif.fr> From: Juliusz Chroboczek To: Francis Bolduc In-Reply-To: References: <87msp4dqaj.wl-jch@irif.fr> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/29.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (korolev.univ-paris7.fr [194.254.61.138]); Sun, 05 May 2024 22:47:53 +0200 (CEST) X-Miltered: at korolev with ID 6637F079.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 6637F079.000 from mailhub.math.univ-paris-diderot.fr/mailhub.math.univ-paris-diderot.fr/null/mailhub.math.univ-paris-diderot.fr/ X-j-chkmail-Score: MSGID : 6637F079.000 on korolev.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham Message-ID-Hash: YW2VBWHSWJXTVJQMDDUTXYQYJ3F2H3XU X-Message-ID-Hash: YW2VBWHSWJXTVJQMDDUTXYQYJ3F2H3XU X-MailFrom: jch@irif.fr X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: galene@lists.galene.org X-Mailman-Version: 3.3.9 Precedence: list Subject: [Galene] Re: Blur background List-Id: =?utf-8?q?Gal=C3=A8ne_videoconferencing_server_discussion_list?= Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: > Yes, loading 3rdparty libraries is conceptually insecure. I initially > tried to download the Javascript libraries and wasm modules to serve > them via Galene, but failed because they refer to each other via full > URL instead of relative paths when you load them. I also tried to > download their source code and build them myself, but my head exploded > when I saw the kind of build system those libraries have. Yeah, these are the two reasons I've been waiting for Chrome to implement native background blur [1], but that effort appears to have been abandoned. [1] https://chromestatus.com/feature/5077577782263808 >>> + offscreen = new OffscreenCanvas(1920, 1080); >> This should be done lazily, in the filter, not at startup. > Not sure what you mean. How would you do this? Two ways. One is to add a function 'init' to your filter definition: 'blur-background': description: "Blur Background", init: initBlurBackground, f: blurBackground, }, and then, in initBlurBackground, instantiate a new field in your filter: function initBlurBackground(ctx) { this.offscreen = new OffscreenCanvas(...) ... The other solution is to simply do the initialisation in the main function of the filter: if(!(offscreen in this)) { this.offscreen = new OffscreenCanvas(...) ... In either case, the data structures are only created when the filter is first invoked, which means that only users who use your filter pay the cost of initialisation. -- Juliusz