Files
Arbitrate-FrontendH5/node_modules/.cache/babel-loader/2de94c3ee994b619d842b2f35058cdaafa9a3abc6282f593092a311820de9115.json
T

1 line
4.9 KiB
JSON
Raw Normal View History

2024-01-18 10:46:33 +08:00
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport TRTC from 'trtc-sdk-v5';\nlet trtc = TRTC.create();\nimport { startVideo, stopVideo } from '@/api/room.js';\nexport default {\n name: 'Footer',\n props: [\"roomId\"],\n components: {},\n data() {\n return {\n taskId: null\n };\n },\n methods: {\n async exitRoom() {\n await this.stopVideoFn();\n // this.$emit('exitRoom');\n await trtc.exitRoom();\n await trtc.updateLocalVideo({\n publish: false\n });\n await trtc.updateLocalAudio({\n publish: false\n });\n await trtc.destroy();\n this.$router.push({\n name: \"Home\"\n });\n },\n startVideoFn() {\n startVideo({\n caseId: 12865,\n roomId: this.roomId\n }).then(res => {\n this.taskId = res.data.taskId;\n });\n },\n stopVideoFn() {\n stopVideo(this.taskId).then(res => {\n console.log(res, \"Ppp\");\n });\n },\n // 开始云端录制\n openRecord() {\n this.startVideoFn();\n }\n },\n mounted() {\n setTimeout(() => {\n console.log(this.roomId, \"房间号房间哈房间号房间哈房间号\");\n });\n }\n};","map":{"version":3,"names":["TRTC","trtc","create","startVideo","stopVideo","name","props","components","data","taskId","methods","exitRoom","stopVideoFn","updateLocalVideo","publish","updateLocalAudio","destroy","$router","push","startVideoFn","caseId","roomId","then","res","console","log","openRecord","mounted","setTimeout"],"sources":["src/views/components/roomFooter.vue"],"sourcesContent":["<template>\n <div class=\"roomFooter\">\n <!-- <div class=\"mic\">\n <img class=\"iconImg\" src=\"@/assets/mic_on.png\" alt=\"\">\n <div class=\"title\">麦克风</div>\n </div>\n <div class=\"video\">\n <img class=\"iconImg\" src=\"@/assets/video_on.png\" alt=\"\">\n <div class=\"title\">摄像头</div>\n </div> -->\n <div class=\"record\" @click=\"openRecord\">\n <img class=\"iconImg\" src=\"@/assets/record_on.png\" alt=\"\">\n <div class=\"title\">开始录制</div>\n </div>\n <div class=\"empty\"></div>\n <div class=\"outRoom\" @click=\"exitRoom\">\n <el-button type=\"danger\">退出房间</el-button>\n </div>\n </div>\n</template>\n \n<script>\nimport TRTC from 'trtc-sdk-v5';\nlet trtc = TRTC.create();\nimport {startVideo,stopVideo} from '@/api/room.js'\nexport default {\n name: 'Footer',\n props: [\n \"roomId\"\n ],\n components: {\n\n },\n data() {\n return {\n taskId:null\n };\n },\n methods: {\n async exitRoom() {\n await this.stopVideoFn();\n // this.$emit('exitRoom');\n await trtc.exitRoom();\n await trtc.updateLocalVideo({ publish: false });\n await trtc.updateLocalAudio({ publish: false });\n await trtc.destroy();\n this.$router.push({\n name: \"Home\"\n })\n },\n startVideoFn() {\n startVideo({\n caseId:12865,\n roomId:this.roomId\n }).then(res => {\n this.taskId = res.data.taskId;\n })\n },\n stopVideoFn(){\n stopVideo(this.taskId).then(res=>{\n console.log(res,\"Ppp\");\n })\n },\n // 开始云端录制\n openRecord() {\n this.startVideoFn();\n },\n },\n mounted() {\n setTimeout(() => {\n console.log(this.roomId, \"房间号房间哈房间号房间哈房间号\");\n });\n },\n};\n</script>\n \n<style scoped>\n.roomFooter {\n width: 100%;\n height: 100%;\n display: flex;\n}\n\n.mic,\n.video,\n.record,\n.outRoom {\n cursor: pointer;\n width: 10%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.iconImg {\n width: 30%;\n