You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @property {Phaser.Signal} onAccess - This signal is dispatched if the user allows access to their webcam.
136
+
*/
137
+
this.onAccess=newPhaser.Signal();
138
+
139
+
/**
140
+
* @property {Phaser.Signal} onError - This signal is dispatched if an error occurs either getting permission to use the webcam (for a Video Stream) or when trying to play back a video file.
141
+
*/
142
+
this.onError=newPhaser.Signal();
143
+
134
144
/**
135
145
* @property {boolean} touchLocked - true if this video is currently locked awaiting a touch event. This happens on some mobile devices, such as iOS.
136
146
* @default
137
147
*/
138
148
this.touchLocked=false;
139
149
140
150
/**
141
-
* @property {object} videoStream - The Video Stream data. Only set if this Video is streaming from the webcam via `createVideoStream`.
151
+
* @property {MediaStream} videoStream - The Video Stream data. Only set if this Video is streaming from the webcam via `createVideoStream`.
142
152
*/
143
153
this.videoStream=null;
144
154
@@ -206,10 +216,10 @@ Phaser.Video.prototype = {
206
216
* As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam.
207
217
* If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.
208
218
*
209
-
* If they block the webcam a console warning will be displayed containing the NavigatorUserMediaError event.
219
+
* If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError event.
210
220
*
211
221
* You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions.
212
-
* If not given as soon as the stream has enough data the video dimensions will be changed to match the webcam device.
222
+
* If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device.
213
223
* You can listen for this with the onChangeSource signal.
0 commit comments