blob: 0dbcc32d0b271f9772ee5664ba9f5fee35e95a41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
self.onmessage = (e) => {
try {
const mstg = new MediaStreamTrackGenerator({kind: 'video'});
if ('enable' in e.data) {
mstg.enabled = e.data.enable;
}
self.postMessage({result: 'Success'});
} catch (e) {
self.postMessage({result: 'Failure', error: e});
}
}
|