]> git.r.bdr.sh - rbdr/junction/blobdiff - extension/media.js
Format extension
[rbdr/junction] / extension / media.js
index c13c6f12aeb13dd03ef3e40969a8bb4ae8d11948..5e83ac74900d17fe6086cd269ae511c7fa8cb19c 100644 (file)
@@ -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;
-  }
+  },
 };