Przeglądaj źródła

set stream first

Artur Paikin 8 lat temu
rodzic
commit
d30702029a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/plugins/Webcam/index.js

+ 1 - 1
src/plugins/Webcam/index.js

@@ -64,11 +64,11 @@ export default class Webcam extends Plugin {
 
 
     this.webcam.start()
     this.webcam.start()
       .then((stream) => {
       .then((stream) => {
+        this.stream = stream
         this.updateState({
         this.updateState({
           // videoStream: stream,
           // videoStream: stream,
           cameraReady: true
           cameraReady: true
         })
         })
-        this.stream = stream
       })
       })
       .catch((err) => {
       .catch((err) => {
         this.updateState({
         this.updateState({