fix srcobject

pull/16/head
Mustafa Yontar 4 years ago
parent 7d4dc9b63d
commit ca00e32800
  1. 12
      src/lib/RemoteFeed.vue

@ -36,7 +36,7 @@
}),
watch: {
volume (old, newVal) {
console.log(parseFloat(newVal) * 0.01)
this.$refs.feed_video.volume = parseFloat(newVal) * 0.01
}
},
@ -79,8 +79,16 @@
},
onStream (stream) {
console.log('stream is strarted')
if (this.$refs.feed_video) {
try {
this.$refs.feed_video.srcObject = stream
} catch (e) {
this.$refs.feed_video.srcObject = stream
this.$refs.feed_video.src = URL.createObjectURL(stream)
}
} else {
console.log(this.$refs.feed_video)
}
setInterval(this.feedInterval,1000)
},
feedInterval () {

Loading…
Cancel
Save