mirror of
https://github.com/GuerillaStudio/souvenir.git
synced 2025-01-20 22:10:20 +00:00
fix(capture): preview is now available after back
This commit is contained in:
parent
9691a18ac1
commit
c2361f5a7c
1 changed files with 5 additions and 1 deletions
|
@ -42,14 +42,18 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
startCapture () {
|
startCapture () {
|
||||||
this.$store.dispatch('capture')
|
this.$store.dispatch('capture')
|
||||||
|
},
|
||||||
|
updatePreviewMediaStream() {
|
||||||
|
this.$refs.preview.srcObject = this.mediaStream
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
mediaStream: function (mediaStream) {
|
mediaStream: function (mediaStream) {
|
||||||
this.$refs.preview.srcObject = mediaStream
|
this.updatePreviewMediaStream()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
this.updatePreviewMediaStream()
|
||||||
window.objectFitPolyfill(this.$refs.preview)
|
window.objectFitPolyfill(this.$refs.preview)
|
||||||
document.body.classList.add('capture-body')
|
document.body.classList.add('capture-body')
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue