From 4bff32dabb826077ea78b447926482f7a7d37293 Mon Sep 17 00:00:00 2001 From: Mustafa Yontar Date: Sun, 12 Apr 2020 13:15:51 +0300 Subject: [PATCH] some changes --- src/App.vue | 3 +- src/lib/RemoteFeed.vue | 4 +-- src/lib/VueJanus.vue | 3 +- src/router/index.js | 9 +++-- src/store/index.js | 3 +- src/views/Home.vue | 8 +++++ src/views/Room.vue | 74 ++++++++++++++++++++++++++++++++++++++++-- src/views/RoomView.vue | 28 ++++++++++++++++ 8 files changed, 122 insertions(+), 10 deletions(-) create mode 100644 src/views/RoomView.vue diff --git a/src/App.vue b/src/App.vue index c3e43f8..ddfb5df 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,7 @@ diff --git a/src/lib/RemoteFeed.vue b/src/lib/RemoteFeed.vue index 9232ae5..3324eb0 100644 --- a/src/lib/RemoteFeed.vue +++ b/src/lib/RemoteFeed.vue @@ -87,6 +87,7 @@ this.$refs.feed_video.src = URL.createObjectURL(stream) } + this.$refs } else { console.log(this.$refs.feed_video) } @@ -96,6 +97,7 @@ this.bitrate = this.remoteFeed.getBitrate() }, feedResponse (jsep) { + console.log(jsep) var body = { "request": "start", "room": this.room } this.remoteFeed.send({"message": body, "jsep": jsep}) }, @@ -108,7 +110,6 @@ if (msg["janus"]) { console.log("######################") console.log("nn",msg) - } console.log("-------------------------") var event = msg["videoroom"]; @@ -117,7 +118,6 @@ } else if(event !== undefined && event != null) { this.remoteFeed.rfid = msg["id"] this.remoteFeed.rfdisplay = msg["display"] - } else if(event === "event") { var substream = msg["substream"] var temporal = msg["temporal"] diff --git a/src/lib/VueJanus.vue b/src/lib/VueJanus.vue index 0b5581e..babc5c1 100644 --- a/src/lib/VueJanus.vue +++ b/src/lib/VueJanus.vue @@ -348,7 +348,6 @@ this.$janus.listDevices(this.initDevices); - }, initDevices (devices) { console.log(devices) @@ -370,8 +369,8 @@ }, offerSend (jsep) { console.log('vid offer') + console.log(jsep) var publish = {"request": "configure", "audio": true, "video": true}; - this.pluginHandle.send({"message": publish, "jsep": jsep}); }, controlPublishers(msg) { diff --git a/src/router/index.js b/src/router/index.js index f1bcb3b..fbe2f2c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,12 +7,17 @@ Vue.use(VueRouter) { path: '/', name: 'Home', - component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue') + component: () => import(/* webpackChunkName: "Home" */ '../views/Home.vue') }, { path: '/rooms', name: 'Room', - component: () => import(/* webpackChunkName: "about" */ '../views/Room.vue') + component: () => import(/* webpackChunkName: "Room" */ '../views/Room.vue') + }, + { + path: '/room/:id', + name: 'RoomView', + component: () => import(/* webpackChunkName: "RoomView" */ '../views/RoomView.vue') } ] diff --git a/src/store/index.js b/src/store/index.js index 5ce7362..1c588a4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -5,7 +5,8 @@ Vue.use(Vuex) export default new Vuex.Store({ state: { - token: null + token: null, + name: 'None' }, mutations: { }, diff --git a/src/views/Home.vue b/src/views/Home.vue index 8142f8a..57fd9c4 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,6 +1,9 @@