diff --git a/src/App.vue b/src/App.vue index 236aeaa..9773910 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,44 +1,8 @@ @@ -55,9 +19,18 @@ export default { data: () => ({ test: ' ', - room:1234 + room:1234, + username: '', + start:false }), mounted () { + }, + methods: { + startM () { + if (this.username) { + this.start = true + } + } } }; diff --git a/src/lib/RemoteFeed.vue b/src/lib/RemoteFeed.vue index 338cffd..64d4c28 100644 --- a/src/lib/RemoteFeed.vue +++ b/src/lib/RemoteFeed.vue @@ -2,7 +2,15 @@
@@ -13,15 +21,23 @@ janusInit: Object, opaqueId: String, room: Number, - mypvtid: String, - feedid: String + mypvtid: Number, + feedid: Number }, name: "RemoteFeed", data: () => ({ remoteFeed: null, bitrateTimer: null, - bitrate: 0 + muted: false, + bitrate: 0, + volume: 100 }), + watch: { + volume (old, newVal) { + console.log(parseFloat(newVal) * 0.01) + this.$refs.feed_video.volume = parseFloat(newVal) * 0.01 + } + }, mounted () { console.log(this.janusInit) this.janusInit.attach({ @@ -42,6 +58,10 @@ }) }, methods: { + mute () { + this.muted = !this.muted + this.$refs.feed_video.muted = this.muted + }, onSuccess (pluginHandle) { this.remoteFeed = pluginHandle; this.remoteFeed.simulcastStarted = false; @@ -59,6 +79,7 @@ this.$refs.feed_video.srcObject = stream setInterval(() => { + console.log(this.remoteFeed.getBitrate()) this.bitrate = this.remoteFeed.getBitrate() },1000) }, @@ -72,6 +93,11 @@ onMessage (msg, jsep) { console.log(msg) console.log(jsep) + if (msg["janus"]) { + console.log("######################") + console.log("nn",msg) + + } console.log("-------------------------") var event = msg["videoroom"]; if(msg["error"] !== undefined && msg["error"] !== null) { @@ -112,10 +138,19 @@ position: absolute; bottom:0; left:0; + color:#fff; + width:100%; } .vid_main { position: relative; } + .infoSlow { + position: absolute; + right: 0; + bottom:0; + color:#fff; + display:none + } .info { position: absolute; right: 0; diff --git a/src/lib/VueJanus.vue b/src/lib/VueJanus.vue index 4e3f3b5..c7259d6 100644 --- a/src/lib/VueJanus.vue +++ b/src/lib/VueJanus.vue @@ -1,5 +1,6 @@