X-Git-Url: https://git.r.bdr.sh/rbdr/junction/blobdiff_plain/80172072ed99b14e3d5b435b097888a4621f78bc..4ab9ded462b34c26c46d7ab5af1fbe3973d922c9:/extension/media.js diff --git a/extension/media.js b/extension/media.js index c13c6f1..5e83ac7 100644 --- a/extension/media.js +++ b/extension/media.js @@ -1,19 +1,19 @@ const internals = { - mediaStream: null + mediaStream: null, }; export default { async start() { - - internals.mediaStream = internals.mediaStream || await navigator.mediaDevices.getUserMedia({ - audio: true - }); + internals.mediaStream = + internals.mediaStream || + (await navigator.mediaDevices.getUserMedia({ + audio: true, + })); return internals.mediaStream; }, stop() { - if (!internals.mediaStream) { return; } @@ -23,5 +23,5 @@ export default { } internals.mediaStream = null; - } + }, };