Bug 1746883 - Block OffscreenCanvas on Zoom conference domains. r=webcompat-reviewers,denschub

While OffscreenCanvas is enabled, it prevents us from viewing the video
of other participants. It does not appear to be a direct bug in Firefox
because Zoom never attempts to use OffscreenCanvas directly. As such, we
will temporarily prevent it from using it so we can enable it for users
on nightly by default.

Differential Revision: https://phabricator.services.mozilla.com/D134317
This commit is contained in:
Thomas Wisniewski
2021-12-20 19:20:43 +00:00
parent 0531b5d05b
commit 4e6d5696f7
4 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
"use strict";
/**
* Bug 1746883 - disable OffscreenCanvas for Zoom
*
* When OffscreenCanvas is enabled, Zoom breaks due to Canvas2D not being
* supported yet. As such, we disable OffscreenCanvas for now on Zoom.
*/
if (window.OffscreenCanvas) {
console.info(
"OffscreenCanvas has been disabled for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1746883 for details."
);
Object.defineProperty(window.wrappedJSObject, "OffscreenCanvas", {
get: undefined,
set: undefined,
});
Object.defineProperty(
HTMLCanvasElement.wrappedJSObject.prototype,
"transferControlToOffscreen",
{
get: undefined,
set: undefined,
}
);
}