@wemap/camera 9.0.7 → 9.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -39,7 +39,11 @@ declare module '@wemap/camera' {
39
39
 
40
40
  constructor(container: Node, options?: CameraOptions);
41
41
 
42
- start(videoMediaConstraints?: MediaStreamConstraints): Promise<void>;
42
+ start(videoMediaConstraints?: MediaTrackConstraints)
43
+ : Promise<{
44
+ videoElement: HTMLVideoElement,
45
+ stream: MediaStream
46
+ }>;
43
47
  stop(): Promise<void>;
44
48
  release(): void;
45
49
 
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/camera"
13
13
  },
14
14
  "name": "@wemap/camera",
15
- "version": "9.0.7",
15
+ "version": "9.0.8",
16
16
  "bugs": {
17
17
  "url": "https://github.com/wemap/wemap-modules-js/issues"
18
18
  },
@@ -32,5 +32,5 @@
32
32
  "@types/events": "^3.0.0"
33
33
  },
34
34
  "type": "module",
35
- "gitHead": "d703276c4576784d85e63e28fbcec18a150c08be"
35
+ "gitHead": "68d42075fd79592fb762747c41a86d930a800625"
36
36
  }
package/src/Camera.js CHANGED
@@ -107,10 +107,13 @@ class Camera extends EventEmitter {
107
107
  }
108
108
 
109
109
  this._state = Camera.State.STARTED;
110
- this.emit(Camera.State.STARTED, {
110
+ const output = {
111
111
  videoElement: this.videoElement,
112
112
  stream
113
- });
113
+ };
114
+
115
+ this.emit(Camera.State.STARTED, output);
116
+ return output;
114
117
  }
115
118
 
116
119
  async stop() {