Commit 0bf24f43 authored by Linshizhi's avatar Linshizhi

Use classic Web worker.

parent 58e2992e
......@@ -18,8 +18,7 @@ export class WW extends Observable {
this.#ident = name;
this.#ww = new Worker(
new URL(path, import.meta.url),
{ type: 'module' }
new URL(path, import.meta.url)
);
}
......
import { assert } from './utils.js';
import { assert, sleep } from './utils.js';
import { WWGroup } from './WWGroup.js';
import { WW } from './WW.js';
import { Channel } from './channel.js';
......
This diff is collapsed.
import { sleep } from '../src/utils.js';
import { H264EncWWGroup } from '../src/encGroup.js';
import { Obervable, Observable } from 'rxjs';
......@@ -189,12 +188,12 @@ describe("Channel Spec", () => {
describe("H264EncWWGroup Spec", () => {
it("Instantiation", async () => {
let wg = new H264EncWWGroup("h264enc", { numOfWW: 3 });
let wg = new H264EncWWGroup("h264enc", { numOfWW: 2 });
await wg.start();
await sleep(1000);
expect(wg.numOfWorker()).toBe(3);
expect(wg.numOfWorker()).toBe(2);
});
......
......@@ -2,7 +2,7 @@ const path = require('path');
const webpack = require("webpack");
module.exports = {
entry: './tests/specs.js',
entry: './specs.js',
mode: 'development',
output: {
filename: 'spec_bundle.js',
......@@ -16,9 +16,6 @@ module.exports = {
exclude: /node_modules/,
use: ['babel-loader']
},
{
}
]
},
plugins: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment