diff options
Diffstat (limited to 'testing/web-platform/tests/mediacapture-insertable-streams/dedicated-worker.js')
-rw-r--r-- | testing/web-platform/tests/mediacapture-insertable-streams/dedicated-worker.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mediacapture-insertable-streams/dedicated-worker.js b/testing/web-platform/tests/mediacapture-insertable-streams/dedicated-worker.js new file mode 100644 index 0000000000..0dbcc32d0b --- /dev/null +++ b/testing/web-platform/tests/mediacapture-insertable-streams/dedicated-worker.js @@ -0,0 +1,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}); + } +}
\ No newline at end of file |