mirror of
https://github.com/GuerillaStudio/souvenir.git
synced 2025-01-20 15:50: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: {
|
||||
startCapture () {
|
||||
this.$store.dispatch('capture')
|
||||
},
|
||||
updatePreviewMediaStream() {
|
||||
this.$refs.preview.srcObject = this.mediaStream
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
mediaStream: function (mediaStream) {
|
||||
this.$refs.preview.srcObject = mediaStream
|
||||
this.updatePreviewMediaStream()
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.updatePreviewMediaStream()
|
||||
window.objectFitPolyfill(this.$refs.preview)
|
||||
document.body.classList.add('capture-body')
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue