]>
git.r.bdr.sh - rbdr/junction/blob - extension/media.js
ae60ec905c7f3bda3a311ea3a7766ec63e381a16
5 export async
function startMedia() {
6 internals
.mediaStream
=
7 internals
.mediaStream
||
8 (await navigator
.mediaDevices
.getUserMedia({
12 return internals
.mediaStream
;
15 export async
function stopMedia() {
16 if (!internals
.mediaStream
) {
20 for (const track
of internals
.mediaStream
.getTracks()) {
24 internals
.mediaStream
= null;