|
@@ -177,7 +177,6 @@ module.exports = class Webcam {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
delete this.stream
|
|
delete this.stream
|
|
- delete this.video
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (this.userMedia !== true) {
|
|
if (this.userMedia !== true) {
|
|
@@ -246,7 +245,7 @@ module.exports = class Webcam {
|
|
* Stops the webcam capture and video playback.
|
|
* Stops the webcam capture and video playback.
|
|
*/
|
|
*/
|
|
stop () {
|
|
stop () {
|
|
- let { video, videoStream } = this
|
|
|
|
|
|
+ let { videoStream } = this
|
|
|
|
|
|
this.updateState({
|
|
this.updateState({
|
|
cameraReady: false
|
|
cameraReady: false
|
|
@@ -262,20 +261,6 @@ module.exports = class Webcam {
|
|
videoStream.onended = null
|
|
videoStream.onended = null
|
|
videoStream = null
|
|
videoStream = null
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (video) {
|
|
|
|
- video.onerror = null
|
|
|
|
- video.pause()
|
|
|
|
-
|
|
|
|
- if (video.mozSrcObject) {
|
|
|
|
- video.mozSrcObject = null
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- video.src = ''
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.video = document.querySelector('.UppyWebcam-video')
|
|
|
|
- this.canvas = document.querySelector('.UppyWebcam-canvas')
|
|
|
|
}
|
|
}
|
|
|
|
|
|
flashNotify (type, msg) {
|
|
flashNotify (type, msg) {
|