Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(face-landmarks) fix createImageBitMap polyfill on Safari 14

Saúl Ibarra Corretgéef748c576d82
diff --git a/react/features/face-landmarks/createImageBitmap.js b/react/features/face-landmarks/createImageBitmap.js
index 89f159ba00..59a61c1c12 100644
--- a/react/features/face-landmarks/createImageBitmap.js
+++ b/react/features/face-landmarks/createImageBitmap.js
@@ -1,5 +1,5 @@
/*
-* Safari polyfill for createImageBitmap
+* Safari < 15 polyfill for createImageBitmap
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap
*
* Support source image types: Canvas.
@@ -16,6 +16,9 @@ if (!('createImageBitmap' in window)) {
}
const img = document.createElement('img');
+ // eslint-disable-next-line no-empty-function
+ img.close = () => {};
+
img.addEventListener('load', () => {
resolve(img);
});