blob: 61ff67bcff03099cbf93fbb594e9b188d85a9f11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
onconnect = (e) => {
const port = e.ports[0];
port.onmessage = (e) => {
try {
const generator = new MediaStreamTrackGenerator({kind: 'video'});
port.postMessage({result: 'Success'});
} catch (e) {
port.postMessage({result: 'Failure', error: e});
}
}
}
|