misc: set worker names

This commit is contained in:
Saúl Ibarra Corretgé 2020-04-23 14:32:58 +02:00 committed by Saúl Ibarra Corretgé
parent 93ef8495ca
commit 6ce27ef10d
4 changed files with 5 additions and 5 deletions

View File

@ -248,11 +248,11 @@ export class FlacAdapter extends AbstractAudioContextAdapter {
// only when flac recording is in use.
try {
// try load the minified version first
this._encoder = new Worker('/libs/flacEncodeWorker.min.js');
this._encoder = new Worker('/libs/flacEncodeWorker.min.js', { name: 'FLAC encoder worker' });
} catch (exception1) {
// if failed, try unminified version
try {
this._encoder = new Worker('/libs/flacEncodeWorker.js');
this._encoder = new Worker('/libs/flacEncodeWorker.js', { name: 'FLAC encoder worker' });
} catch (exception2) {
throw new Error('Failed to load flacEncodeWorker.');
}

View File

@ -43,7 +43,7 @@ export default class JitsiStreamBlurEffect {
this._outputCanvasElement.getContext('2d');
this._inputVideoElement = document.createElement('video');
this._maskFrameTimerWorker = new Worker(timerWorkerScript);
this._maskFrameTimerWorker = new Worker(timerWorkerScript, { name: 'Blur effect worker' });
this._maskFrameTimerWorker.onmessage = this._onMaskFrameTimer;
}

View File

@ -64,7 +64,7 @@ export default class JitsiStreamPresenterEffect {
// Bind event handler so it is only bound once for every instance.
this._onVideoFrameTimer = this._onVideoFrameTimer.bind(this);
this._videoFrameTimerWorker = new Worker(timerWorkerScript);
this._videoFrameTimerWorker = new Worker(timerWorkerScript, { name: 'Presenter effect worker' });
this._videoFrameTimerWorker.onmessage = this._onVideoFrameTimer;
}

View File

@ -46,7 +46,7 @@ export default class ScreenshotCaptureEffect {
// Bind handlers such that they access the same instance.
this._handleWorkerAction = this._handleWorkerAction.bind(this);
this._initScreenshotCapture = this._initScreenshotCapture.bind(this);
this._streamWorker = new Worker(timerWorkerScript);
this._streamWorker = new Worker(timerWorkerScript, { name: 'Screenshot capture worker' });
this._streamWorker.onmessage = this._handleWorkerAction;
}