fix: restart stream when switching between mjpegstreamer webcams
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 file changed
+6
-1
@@ -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>
|
||||
Reference in new issue
Block a user