]>
git.r.bdr.sh - rbdr/junction/blob - extension/media.js
416053aa7e65dda87ad70397f643224dc4378fab
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
.getAudioTracks()) {
24 internals
.mediaStream
= null;