You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ReferenceError: Can't find variable: OffscreenCanvas occurs when instantiating the BackgroundProcessor in:
@twilio/video-processors/lib/processors/background/BackgroundProcessor.ts in BackgroundProcessor at line 84:61 private readonly _inputFrameCanvas: OffscreenCanvas = new OffscreenCanvas(1, 1);
The ReferenceError: Can't find variable: document occur in twilio-virtual-background-processor-pipeline-worker.js and twilio-gaussian-blur-background-processor-pipeline-worker.js in:
function getCanvas() {
return typeof OffscreenCanvas !== 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas');
}
We are using the const isSupported from '@twilio/video-processors' to prevent non-supported browsers from using this feature, so these user agents are supposed to be supported.
On macOS, the errors occur on Safari <= 16.3.
On iPad, the errors occur on iOS / iPadOS <=16.3.1
This is probably related to the fact that Safari started supporting OffscreenCanvas only in version 16.4.
If document.createElement('canvas'); is called from within a web worker, then the document won't be available, hence the ReferenceError: Can't find variable: document
Browser(s): Safari <=16.3, any browser using WebKIT while iOS <=16.3.1.
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Our Sentry logs show that multiple users are encountering the following errors when using @twilio/video-processors version 3.0.0.
The
ReferenceError: Can't find variable: OffscreenCanvas
occurs when instantiating the BackgroundProcessor in:@twilio/video-processors/lib/processors/background/BackgroundProcessor.ts in BackgroundProcessor at line 84:61
private readonly _inputFrameCanvas: OffscreenCanvas = new OffscreenCanvas(1, 1);
The
ReferenceError: Can't find variable: document
occur in twilio-virtual-background-processor-pipeline-worker.js and twilio-gaussian-blur-background-processor-pipeline-worker.js in:We are using the
const isSupported
from '@twilio/video-processors' to prevent non-supported browsers from using this feature, so these user agents are supposed to be supported.This is probably related to the fact that Safari started supporting
OffscreenCanvas
only in version 16.4.If
document.createElement('canvas');
is called from within a web worker, then thedocument
won't be available, hence theReferenceError: Can't find variable: document
The text was updated successfully, but these errors were encountered: