fix(screenshot-captue): get the right worker url

pull/14067/head jitsi-meet_9102
Gabriel Borlea 2 years ago committed by Gabriel Borlea
parent 6d02f50d09
commit 0ecd65777e
  1. 8
      react/features/screenshot-capture/ScreenshotCaptureSummary.tsx

@ -45,8 +45,14 @@ export default class ScreenshotCaptureSummary {
// Bind handlers such that they access the same instance.
this._handleWorkerAction = this._handleWorkerAction.bind(this);
const baseUrl = `${getBaseUrl()}libs/`;
const workerUrl = `${baseUrl}screenshot-capture-worker.min.js`;
let workerUrl = `${baseUrl}screenshot-capture-worker.min.js`;
// @ts-ignore
const workerBlob = new Blob([ `importScripts("${workerUrl}");` ], { type: 'application/javascript' });
// @ts-ignore
workerUrl = window.URL.createObjectURL(workerBlob);
this._streamWorker = new Worker(workerUrl, { name: 'Screenshot capture worker' });
this._streamWorker.onmessage = this._handleWorkerAction;

Loading…
Cancel
Save