fix: restart stream when switching between mjpegstreamer webcams

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej committed 2022-01-05 01:48:27 +01:00
1 parent 2ff9e5a111
commit dc4a322420
1 file changed
+6 -1
+6 -1
View File
@@ -23,7 +23,7 @@
<script lang="ts">
import Component from 'vue-class-component'
import {Mixins, Prop} from 'vue-property-decorator'
import {Mixins, Prop, Watch} from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
const CONTENT_LENGTH = 'content-length'
@@ -189,5 +189,10 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
this.stopStream()
this.startStream()
}
@Watch('url')
urlChanged() {
this.restartStream()
}
}
</script>