Skip to content

Commit

Permalink
Change the naming of worker.js and fix proxy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Dec 5, 2024
1 parent 8c93b47 commit 48bc1a4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions karma.conf.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ module.exports = function(config) {

],

proxies: [
{'/volume-meter-processor.js': '/base/src/main/js/volume-meter-processor.js'},
{'/worker.js': '/base/src/main/js/worker.js'}
],
proxies: {'/volume-meter-processor.js': '/base/src/main/js/volume-meter-processor.js',
'/draw-desktop-with-camera-source-worker.js': '/base/src/main/js/draw-desktop-with-camera-source-worker.js'
},

reporters: ['progress', 'coverage'],

Expand Down
2 changes: 1 addition & 1 deletion rollup.config.module.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const builds = {
'src/main/js/utility.js',
'src/main/js/media_manager.js',
'src/main/js/stream_merger.js',
'src/main/js/worker.js',
'src/main/js/draw-desktop-with-camera-source-worker.js',
],
output: [{
dir: 'dist',
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main/js/media_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export class MediaManager {

promise.then(() => {
// Initialize the worker
const worker = new Worker('worker.js');
const worker = new Worker(new URL("./draw-desktop-with-camera-source-worker.js", import.meta.url));

// Send the OffscreenCanvas to the worker
worker.postMessage({
Expand Down

0 comments on commit 48bc1a4

Please sign in to comment.