| @@ -89,6 +89,7 @@ export default { | |||||
| inputText: "", | inputText: "", | ||||
| screenWidth: document.documentElement.clientWidth, | screenWidth: document.documentElement.clientWidth, | ||||
| screenHeight: document.documentElement.clientHeight, | screenHeight: document.documentElement.clientHeight, | ||||
| socket: null, | |||||
| }; | }; | ||||
| }, | }, | ||||
| computed: { | computed: { | ||||
| @@ -114,6 +115,13 @@ export default { | |||||
| expendChatBox() { | expendChatBox() { | ||||
| this.isExpend = !this.isExpend; | this.isExpend = !this.isExpend; | ||||
| }, | }, | ||||
| socketOnLink() { | |||||
| this.socket = new WebSocket("wss://43.143.227.135:8989/webrtc"); | |||||
| this.socket.onclose = function (evt) { | |||||
| console.log("连接已断开."); | |||||
| }; | |||||
| }, | |||||
| }, | }, | ||||
| created() {}, | created() {}, | ||||
| mounted() { | mounted() { | ||||
| @@ -122,6 +130,7 @@ export default { | |||||
| this.videoUrl = | this.videoUrl = | ||||
| "https://video.metavatar.cc/sv/d51a6f6-187fa2dff79/d51a6f6-187fa2dff79.mp4"; | "https://video.metavatar.cc/sv/d51a6f6-187fa2dff79/d51a6f6-187fa2dff79.mp4"; | ||||
| this.loading = true; | this.loading = true; | ||||
| this.socketOnLink(); | |||||
| }, | }, | ||||
| }; | }; | ||||
| </script> | </script> | ||||