PageRtcLive.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. <template>
  2. <div id="PageRtcLive">
  3. <div class="member_number">
  4. <div class="members"></div>
  5. <span>{{ user_list.length }}观看</span>
  6. </div>
  7. <!-- <chat ref="chat" v-show="chatShow" :chatList="chatList" :user_info="user_info"></chat> -->
  8. <div class="videoBox userVideo" id="userVideo" v-show="!hideVideoTop">
  9. <img v-if="!userVideoShow" :src="require('@/assets/images/rtcLive/avatar_small@2x.png')" alt="" />
  10. <img v-if="!userVideoShow" class="loadingTip" :src="require('@/assets/images/rtcLive/loading@2x.png')" alt="" />
  11. <div class="micBox">
  12. <i v-if="hideMicTop" class="iconfont iconscene_mic_off1"></i>
  13. <i v-else class="speak_mic"></i>
  14. </div>
  15. </div>
  16. <div v-show="mode == '1' && !hideVideoBottom" class="videoBox myVideo" id="myVideo">
  17. <img v-if="!myVideoShow" :src="require('@/assets/images/rtcLive/avatar_small@2x.png')" alt="" />
  18. <img v-if="!myVideoShow" class="loadingTip" :src="require('@/assets/images/rtcLive/loading@2x.png')" alt="" />
  19. <div class="micBox">
  20. <i v-if="hideMic" class="iconfont iconscene_mic_off1"></i>
  21. <i v-else class="speak_mic"></i>
  22. </div>
  23. </div>
  24. <!-- </div> -->
  25. <!-- <input type="text" autocomplete="off"> -->
  26. <div class="contorlBar" v-if="!showInput">
  27. <div v-if="connectStatus == 1" :class="{ disable: !user_info.isWords }" class="saySomething" @click="onFocus">
  28. <!-- <i class="speakIcon"
  29. :class="{'dis':!user_info.isWords}"></i> -->
  30. <span v-if="user_info.isWords"> 说点什么 </span>
  31. <span v-if="!user_info.isWords">已被禁言</span>
  32. <div class="disSpeakBtn" @click.stop="chatShow = !chatShow" :class="{ dis: !chatShow }"></div>
  33. </div>
  34. <div style="text-align: right; width: 100%" v-if="connectStatus == 0">连接中...</div>
  35. <div v-if="connectStatus == 1" class="contorl_btn">
  36. <div v-if="isBrushes" @click="onDrawUndo" class="brushesBack" :class="{ disable: !canUndo }"></div>
  37. <div v-if="user_info.Role == 'leader'" @click="onDraw" :class="{ brushesed: isBrushes }" class="brushes"></div>
  38. <div
  39. v-if="(user_list.length < 2 && mode == '1') || (mode == '2' && user_list.length < 30)"
  40. class="invitation"
  41. @click="openDialog('dialogShare', shareLink)"
  42. ></div>
  43. <div v-if="mode == '2' && role == 'leader'" class="members" @click="openMember"></div>
  44. <div v-if="audioDevices.length != 0 && !disableMic" @click="changeMedia('audio', hideMic)" :class="{ mic_off: hideMic }" class="mic_on"></div>
  45. <div v-if="audioDevices.length == 0 || disableMic" class="mic_no"></div>
  46. <div
  47. v-if="(role == 'leader' && videoDevices.length != 0) || (mode == '1' && videoDevices.length != 0)"
  48. @click="changeMedia('video', hideVideo)"
  49. :class="{ video_off: hideVideo }"
  50. class="video_on"
  51. ></div>
  52. <div v-if="(videoDevices.length == 0 && mode == '1') || (role == 'leader' && videoDevices.length == 0)" class="video_no"></div>
  53. <div class="exit" @click="openDialog('dialogIndex')"></div>
  54. </div>
  55. </div>
  56. <div class="layer" v-if="showInput" @click="closeInput">
  57. <div class="inputBox" @click.stop>
  58. <div class="msgBox">
  59. <input id="input_msg" type="text" maxlength="200" v-model.trim="text" :placeholder="`说点什么~`" />
  60. <span class="iconsend_icon" :class="{ disable: text == '' }" @click.stop="sendText">发送</span>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- 成员 -->
  65. <div class="layer" v-if="showMember" @click.self="closeMember">
  66. <div class="memberContent animated" :class="animateActive ? 'fadeInUpBig' : 'fadeOutDownBig'">
  67. <div class="blurBox"></div>
  68. <div class="content">
  69. <div class="memberHeader">
  70. <span> 成员管理({{ user_list.length }})</span>
  71. <i class="iconfont"></i>
  72. </div>
  73. <div class="memberList">
  74. <div class="memberItem">
  75. <div class="userMsg">
  76. <div class="avatar">
  77. <img :src="require('@/assets/images/rtcLive/avatar_small@2x.png')" alt="" />
  78. </div>
  79. <div class="name" v-if="user_info.Role == 'leader'">{{ user_info.Nickname }} (主持人,我)</div>
  80. <div class="name" v-else>{{ user_info.Nickname }} (我)</div>
  81. </div>
  82. <div class="button" v-if="user_info.Role == 'leader'">
  83. <!-- <div class="outBtn iconfont iconremove"></div> -->
  84. <!-- <div v-if="audioDevices.length>0" class="micBtn iconfont" @click="changeMedia('audio',hideMic)" :class="user_info.muted ?'iconmic_off':'iconmic_on'"></div>
  85. <div v-else class="micBtn iconfont iconmic_off"></div> -->
  86. <div class="micBtn mute_all_mic" :class="{ open_all_mic: !all_mute_mic }" @click="onMemberMuted(all_mute_mic)"></div>
  87. </div>
  88. </div>
  89. <div v-show="user_info.UserId != i.UserId && i.role != 'leader'" class="memberItem" v-for="i in user_list" :key="i.UserId">
  90. <div class="userMsg">
  91. <div class="avatar">
  92. <img :src="require('@/assets/images/rtcLive/avatar_small@2x.png')" alt="" />
  93. </div>
  94. <div class="name">{{ i.userName }}</div>
  95. </div>
  96. <div class="button" v-if="user_info.Role == 'leader'">
  97. <div class="micBtn" :class="i.isWords ? 'ban_speak_on' : 'ban_speak_off'" @click="userCanSpeak(i)"></div>
  98. <div class="outBtn icon_remove" @click="userGetOut(i.UserId)"></div>
  99. <div class="micBtn" :class="i.isMuted ? 'mute_one_mic_off' : 'mute_one_mic_on'" @click="onMemberMuted(!i.isMuted, i.UserId)"></div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <Draw ref="draw" @sendCanUndo="sendCanUndo" :show-paint="showPaint" />
  107. </div>
  108. </template>
  109. <script setup>
  110. import { onMounted, watch, defineEmits, ref, nextTick } from "vue";
  111. import { useApp, getApp } from "@/app";
  112. import { useStore } from "vuex";
  113. import { Scrollbar, Dialog } from "@/global_components/";
  114. import common from "@/utils/common";
  115. // import Draw from './paint/Draw';
  116. import { mapGetters } from "vuex";
  117. // import chat from './chat/chat.vue';
  118. import browser from "@/utils/browser";
  119. const emit = defineEmits(["openDialog"]);
  120. const store = useStore();
  121. let createSocket = (config) => {
  122. var socket = io("https://vr-admin.cdfmembers.com/", {
  123. path: "/ws-sync",
  124. transports: ["websocket"],
  125. });
  126. return socket;
  127. };
  128. let getUrl = (href, queryArr) => {
  129. queryArr.forEach((item) => {
  130. if (!browser.hasURLParam(item.key)) {
  131. href += `&${item.key}=${item.val}`;
  132. } else {
  133. href = browser.replaceQueryString(href, item.key, item.val);
  134. }
  135. });
  136. return href;
  137. };
  138. const connectStatus = ref(0);
  139. const showPaint = ref(true);
  140. const isBrushes = ref(false);
  141. const hideVideo = ref(false);
  142. const hideVideoBottom = ref(false);
  143. const hideVideoTop = ref(true);
  144. const hideMic = ref(false);
  145. const hideMicTop = ref(false);
  146. const showInput = ref(false);
  147. const showMember = ref(false);
  148. const animateActive = ref(false);
  149. const socket = ref(createSocket());
  150. const myVideoShow = ref(false);
  151. const userVideoShow = ref(false);
  152. const user_info = ref({});
  153. const user_list = ref([]);
  154. const mode = ref(browser.getURLParam("mode"));
  155. const role = ref(browser.getURLParam("role"));
  156. const chatList = ref([]);
  157. const text = ref("");
  158. const shareLink = ref("");
  159. const canUndo = ref(false);
  160. const audioDevices = ref([1]);
  161. const videoDevices = ref([1]);
  162. const disableMic = ref(false);
  163. const chatShow = ref(true);
  164. const all_mute_mic = ref(true);
  165. const onDrawUndo = () => {};
  166. const onFocus = () => {
  167. showInput.value = true;
  168. nextTick(() => {
  169. let input_msg = document.getElementById("input_msg");
  170. input_msg.focus();
  171. });
  172. };
  173. // 关闭输入框
  174. const closeInput = () => {
  175. showInput.value = false;
  176. text.value = "";
  177. };
  178. // 开启成员
  179. const openMember = () => {
  180. showMember.value = true;
  181. animateActive.value = true;
  182. };
  183. // 关闭成员
  184. const closeMember = () => {
  185. animateActive.value = false;
  186. let t = setTimeout(() => {
  187. clearTimeout(t);
  188. showMember.value = false;
  189. }, 200);
  190. };
  191. const openDialog = (str, link) => {
  192. // getApp().Connect.follow.start();
  193. emit("openDialog", str, link);
  194. };
  195. const onMemberMuted = (muted, userId) => {
  196. if (user_list.value.length > 1) {
  197. Dialog.toast({ content: `操作成功`, type: "success" });
  198. socket.value && socket.value.send("Muted", muted, userId);
  199. }
  200. };
  201. const userCanSpeak = (item) => {
  202. item.isWords = !item.isWords;
  203. socket.value && socket.value.invoke("Words", isWords, userId);
  204. };
  205. const startFollow = (app) => {
  206. var isJoined = false;
  207. socket.value.on("connect", () => {
  208. socket.value.emit("join", {
  209. userId: browser.getURLParam("userId") || common.uuid(12),
  210. roomId: browser.getURLParam("roomId") || common.uuid(12),
  211. role: role.val || "leader",
  212. });
  213. });
  214. // 加入房间成功
  215. socket.value.on("join", (data) => {
  216. connectStatus.value = 1;
  217. console.log(data,'join');
  218. user_info.value = data.user;
  219. user_list.value = data.members;
  220. console.log(user_info.value, "user_info");
  221. //更新分享链接
  222. shareLink.value = getUrl(window.location.href, [
  223. {
  224. key: "mode",
  225. val: mode.value,
  226. },
  227. {
  228. key: "name",
  229. val: "",
  230. },
  231. {
  232. key: "role",
  233. val: "customer",
  234. },
  235. {
  236. key: "roomId",
  237. val: user_info.value.RoomId,
  238. },
  239. ]);
  240. let tmp = "";
  241. if (user_info.value.Role == "leader") {
  242. tmp = getUrl(window.location.href, [
  243. {
  244. key: "roomId",
  245. val: user_info.value.RoomId,
  246. },
  247. {
  248. key: "userId",
  249. val: user_info.value.UserId,
  250. },
  251. ]);
  252. } else {
  253. tmp = getUrl(window.location.href, [
  254. {
  255. key: "userId",
  256. val: user_info.value.UserId,
  257. },
  258. ]);
  259. }
  260. history.replaceState(null, null, tmp);
  261. isJoined = true;
  262. });
  263. socket.value.on("action", (data) => {
  264. if (data.type == "error") {
  265. Dialog.toast({ content: `房间未找到`, type: "error" });
  266. } else if (data.type == "user-join") {
  267. }
  268. });
  269. socket.value.on("sync", (data) => {
  270. app.Connect.sync.receive(data);
  271. });
  272. };
  273. onMounted(() => {
  274. useApp().then((app) => {
  275. startFollow(app);
  276. });
  277. });
  278. </script>
  279. <style scoped lang="scss">
  280. #PageRtcLive {
  281. position: absolute;
  282. left: 0;
  283. bottom: 0;
  284. // height: 7.31rem;
  285. width: 100%;
  286. z-index: 999;
  287. // background: rgba(0, 0, 0, 0.1);
  288. padding: 0 0.44rem;
  289. box-sizing: border-box;
  290. // pointer-events: none;
  291. .member_number {
  292. // width: 1.67rem;
  293. height: 0.5rem;
  294. background: rgba(0, 0, 0, 0.3);
  295. border-radius: 0.25rem;
  296. position: fixed;
  297. top: 0.56rem;
  298. right: 0.44rem;
  299. padding: 0.07rem 0.17rem;
  300. display: flex;
  301. align-items: center;
  302. justify-content: center;
  303. .members {
  304. width: 0.42rem;
  305. height: 0.42rem;
  306. background: url(~@/assets/images/rtcLive/members@2x.png);
  307. background-size: 100% 100%;
  308. margin-right: 0.07rem;
  309. }
  310. span {
  311. font-size: 0.24rem;
  312. color: #fff;
  313. }
  314. }
  315. .videoBox {
  316. width: 1.94rem;
  317. height: 1.94rem;
  318. border-radius: 50%;
  319. overflow: hidden;
  320. position: fixed;
  321. .loadingTip {
  322. position: absolute;
  323. z-index: 101;
  324. left: 0;
  325. top: 0;
  326. animation: Rotate 1.5s infinite;
  327. @keyframes Rotate {
  328. 0% {
  329. transform: rotate(0deg);
  330. }
  331. 100% {
  332. transform: rotate(360deg);
  333. }
  334. }
  335. }
  336. > img {
  337. width: 1.94rem;
  338. height: 1.94rem;
  339. }
  340. .videoPlayer {
  341. width: 1.94rem;
  342. height: 1.94rem;
  343. position: relative;
  344. z-index: 2;
  345. }
  346. &.userVideo {
  347. top: 0.69rem;
  348. left: 0.53rem;
  349. // background-size: ;
  350. }
  351. &.myVideo {
  352. bottom: 2.72rem;
  353. right: 0.69rem;
  354. }
  355. .micBox {
  356. width: 100%;
  357. height: 0.44rem;
  358. background: rgba(0, 0, 0, 0.3);
  359. position: absolute;
  360. left: 0;
  361. bottom: 0;
  362. z-index: 100;
  363. display: flex;
  364. align-items: center;
  365. justify-content: center;
  366. .speak_mic {
  367. display: block;
  368. background-size: 13.3344rem auto;
  369. width: 0.22rem;
  370. height: 0.22rem;
  371. background-image: url(~@/assets/images/rtcLive/speed.png);
  372. // width: 0.69rem;
  373. // height: 0.69rem;
  374. animation: myAnimation 3s steps(59) infinite;
  375. }
  376. .iconscene_mic_off1 {
  377. font-size: 0.22rem;
  378. color: #f56c6c;
  379. }
  380. }
  381. }
  382. .contorlBar {
  383. width: 9.51rem;
  384. height: 1.173333rem;
  385. background: rgba(0, 0, 0, 0.5);
  386. border-radius: 0.67rem;
  387. border: 0.03rem solid rgba(255, 255, 255, 0.1);
  388. margin: 0.67rem auto 0;
  389. // position: absolute;
  390. position: fixed;
  391. z-index: 9999;
  392. left: 50%;
  393. transform: translateX(-50%);
  394. padding: 0 0.266667rem;
  395. box-sizing: border-box;
  396. bottom: 0.94rem;
  397. display: flex;
  398. align-items: center;
  399. justify-content: space-between;
  400. .saySomething {
  401. color: #fff;
  402. // font-size: 0.42rem;
  403. height: 0.8rem;
  404. position: relative;
  405. display: flex;
  406. align-items: center;
  407. justify-content: center;
  408. background: rgba(0, 0, 0, 0.5);
  409. padding: 0 0.2rem 0 0.2rem;
  410. border-radius: 0.64rem;
  411. width: 100%;
  412. display: flex;
  413. align-items: center;
  414. justify-content: space-between;
  415. .disSpeakBtn {
  416. width: 0.533333rem;
  417. height: 0.533333rem;
  418. background: url(~@/assets/images/rtcLive/pop-up_screen_on@2x.png) no-repeat;
  419. background-size: 100% 100%;
  420. cursor: pointer;
  421. &.dis {
  422. background: url(~@/assets/images/rtcLive/pop-up_screen_off@2x.png) no-repeat;
  423. background-size: 100% 100%;
  424. }
  425. }
  426. .speakIcon {
  427. width: 0.32rem;
  428. height: 0.32rem;
  429. background: url(~@/assets/images/rtcLive/Input_norma@2x.png);
  430. background-size: 100% 100%;
  431. display: block;
  432. margin-right: 0.1rem;
  433. &.dis {
  434. background: url(~@/assets/images/rtcLive/Input_disabled@2x.png);
  435. background-size: 100% 100%;
  436. }
  437. }
  438. span {
  439. font-size: 0.266667rem;
  440. }
  441. // &::after {
  442. // content: "";
  443. // position: absolute;
  444. // width: 0.04rem;
  445. // height: 0.44rem;
  446. // background: #ffffff;
  447. // border-radius: 0.03rem;
  448. // top: 50%;
  449. // transform: translateY(-50%);
  450. // right: -0.28rem;
  451. // }
  452. }
  453. .contorl_btn {
  454. display: flex;
  455. align-items: center;
  456. justify-content: space-between;
  457. margin-left: 0.2rem;
  458. > div {
  459. // width: 0.56rem;
  460. // height: 0.56rem;
  461. width: 0.65rem;
  462. height: 0.65rem;
  463. // font-size: 0.56rem;
  464. // background: #FD5151;
  465. margin-right: 0.33rem;
  466. // &.iconexit {
  467. // // width: 0.56rem;
  468. // // height: 0.56rem;
  469. // color: #fd5151;
  470. // // background: #fff;
  471. // // border-radius: 50%;
  472. // // overflow: hidden;
  473. // }
  474. &.brushesBack {
  475. background: url(~@/assets/images/rtcLive/revocation@2x.png);
  476. background-size: 100% 100%;
  477. }
  478. &.brushes {
  479. // background: url(~@/assets/images/rtcLive/brushes@2x.png);
  480. background: url(~@/assets/images/rtcLive/brushes@2x.png);
  481. background-size: 100% 100%;
  482. }
  483. &.brushesed {
  484. background: url(~@/assets/images/rtcLive/brushes_selected@2_1.png);
  485. background-size: 100% 100%;
  486. }
  487. &.invitation {
  488. background: url(~@/assets/images/rtcLive/invitation@2x.png);
  489. background-size: 100% 100%;
  490. }
  491. &.members {
  492. background: url(~@/assets/images/rtcLive/members@2x.png);
  493. background-size: 100% 100%;
  494. }
  495. &.mic_on {
  496. background: url(~@/assets/images/rtcLive/mic_on@2x.png);
  497. background-size: 100% 100%;
  498. }
  499. &.mic_no {
  500. background: url(~@/assets/images/rtcLive/mic_off_50@2x.png);
  501. background-size: 100% 100%;
  502. }
  503. &.mic_off {
  504. background: url(~@/assets/images/rtcLive/mic_off@2x.png);
  505. background-size: 100% 100%;
  506. }
  507. &.video_on {
  508. background: url(~@/assets/images/rtcLive/video_on@2x.png);
  509. background-size: 100% 100%;
  510. }
  511. &.video_no {
  512. background: url(~@/assets/images/rtcLive/video_off_50@2x.png);
  513. background-size: 100% 100%;
  514. }
  515. &.video_off {
  516. background: url(~@/assets/images/rtcLive/video_off@2x.png);
  517. background-size: 100% 100%;
  518. }
  519. &.exit {
  520. background: url(~@/assets/images/rtcLive/exit@2x.png);
  521. background-size: 100% 100%;
  522. }
  523. &:last-child {
  524. margin-right: 0;
  525. }
  526. }
  527. }
  528. }
  529. .layer {
  530. width: 100vw;
  531. height: 100vh;
  532. background: rgba(0, 0, 0, 0.1);
  533. z-index: 10000;
  534. position: fixed;
  535. bottom: 0;
  536. left: 0;
  537. // right: unset;
  538. // top: unset;
  539. .inputBox {
  540. width: 100vw;
  541. height: 1.39rem;
  542. // background: #f2f2f2;
  543. border: 1px solid rgba(255, 255, 255, 0.1);
  544. background: rgba(0, 0, 0, 0.5);
  545. position: absolute;
  546. bottom: 0;
  547. left: 0;
  548. padding: 0 0.44rem;
  549. box-sizing: border-box;
  550. display: flex;
  551. align-items: center;
  552. justify-content: center;
  553. .msgBox {
  554. width: 9.53rem;
  555. height: 0.94rem;
  556. position: absolute;
  557. > input {
  558. width: 9.53rem;
  559. height: 0.94rem;
  560. background: rgba(0, 0, 0, 0.5);
  561. border-radius: 0.56rem;
  562. font-size: 0.42rem;
  563. padding: 0 1.6rem 0 0.44rem;
  564. box-sizing: border-box;
  565. border: none;
  566. outline: none;
  567. color: #fff;
  568. resize: none;
  569. line &::placeholder {
  570. color: rgba(255, 255, 255, 0.5);
  571. }
  572. }
  573. .iconfont {
  574. // width: 0.56rem;
  575. // height: 0.56rem;
  576. // background: #ed5d18;
  577. font-size: 0.56rem;
  578. position: absolute;
  579. top: 50%;
  580. transform: translateY(-50%);
  581. right: 0.78rem;
  582. color: #fff;
  583. &.active {
  584. color: #ed5d18;
  585. }
  586. }
  587. .iconsend_icon {
  588. position: absolute;
  589. top: 50%;
  590. transform: translateY(-50%);
  591. // right: 0.78rem;
  592. right: 0.106667rem;
  593. width: 1.28rem;
  594. height: 0.693333rem;
  595. background: #ed5d18;
  596. color: #fff;
  597. font-size: 0.32rem;
  598. text-align: center;
  599. line-height: 0.693333rem;
  600. border-radius: 0.533333rem;
  601. // width: 0.67rem;
  602. // height: 0.67rem;
  603. // background-image: url(~@/assets/images/rtcLive/send_selected@2x.png);
  604. // background-size: 100% 100%;
  605. }
  606. }
  607. }
  608. .memberContent {
  609. height: auto;
  610. width: 100%;
  611. // background: #ffffff;
  612. border-radius: 0.28rem 0.28rem 0px 0px;
  613. position: absolute;
  614. left: 0;
  615. bottom: 0;
  616. &.animated {
  617. animation-duration: 0.3s;
  618. }
  619. .blurBox {
  620. background: rgba(0, 0, 0, 0.9);
  621. border-radius: 0.14rem 0.14rem 0px 0px;
  622. filter: blur(1px);
  623. position: absolute;
  624. width: 100%;
  625. height: 100%;
  626. z-index: 1;
  627. top: 0;
  628. left: 0;
  629. }
  630. .content {
  631. position: relative;
  632. width: 100%;
  633. height: 100%;
  634. z-index: 2;
  635. top: 0;
  636. left: 0;
  637. }
  638. .memberHeader {
  639. width: 100%;
  640. height: 1.28rem;
  641. text-align: center;
  642. line-height: 1.28rem;
  643. > span {
  644. font-size: 0.42rem;
  645. color: #fff;
  646. }
  647. }
  648. .memberList {
  649. width: 100%;
  650. height: 8.33rem;
  651. border-top-style: solid;
  652. border-top-color: rgba(0, 0, 0, 0.1);
  653. border-top-width: 1px;
  654. border-bottom-style: solid;
  655. border-bottom-color: rgba(0, 0, 0, 0.1);
  656. border-bottom-width: 1px;
  657. box-sizing: border-box;
  658. overflow-y: auto;
  659. &::-webkit-scrollbar {
  660. display: none;
  661. }
  662. .memberItem {
  663. width: 100%;
  664. height: 1.39rem;
  665. display: flex;
  666. align-items: center;
  667. justify-content: space-between;
  668. padding: 0.19rem 0.44rem;
  669. .userMsg {
  670. display: flex;
  671. align-items: center;
  672. justify-content: center;
  673. .avatar {
  674. width: 1rem;
  675. height: 1rem;
  676. border-radius: 50%;
  677. // overflow: hidden;
  678. margin-right: 0.28rem;
  679. > img {
  680. // width: 100%;
  681. // height: 100%;
  682. width: 1rem;
  683. height: 1rem;
  684. }
  685. }
  686. .name {
  687. font-size: 0.39rem;
  688. color: #fff;
  689. }
  690. }
  691. .button {
  692. display: flex;
  693. align-items: center;
  694. justify-content: center;
  695. > div {
  696. // width: 0.56rem;
  697. // height: 0.56rem;
  698. // background: #fc6970;
  699. font-size: 0.65rem;
  700. color: #fff;
  701. &.micBtn {
  702. width: 0.65rem;
  703. height: 0.65rem;
  704. margin-right: 0.3rem;
  705. &.mute_all_mic {
  706. background-image: url(~@/assets/images/rtcLive/mic_all_on@2x.png);
  707. background-size: 100% 100%;
  708. }
  709. &.open_all_mic {
  710. background-image: url(~@/assets/images/rtcLive/mic_all_off@2x.png);
  711. background-size: 100% 100%;
  712. }
  713. &.mute_one_mic_on {
  714. background-image: url(~@/assets/images/rtcLive/mic_on@2x.png);
  715. background-size: 100% 100%;
  716. }
  717. &.mute_one_mic_off {
  718. background-image: url(~@/assets/images/rtcLive/mic_off@2x.png);
  719. background-size: 100% 100%;
  720. }
  721. &.ban_speak_on {
  722. background-image: url(~@/assets/images/rtcLive/chat_on@2x.png);
  723. background-size: 100% 100%;
  724. }
  725. &.ban_speak_off {
  726. background-image: url(~@/assets/images/rtcLive/chat_off@2x.png);
  727. background-size: 100% 100%;
  728. }
  729. }
  730. &.outBtn {
  731. margin-right: 0.3rem;
  732. width: 0.65rem;
  733. height: 0.65rem;
  734. &.icon_remove {
  735. background-image: url(~@/assets/images/rtcLive/remove@2x.png);
  736. background-size: 100% 100%;
  737. }
  738. }
  739. }
  740. }
  741. }
  742. }
  743. .memberBottom {
  744. width: 100%;
  745. padding: 0 0.44rem;
  746. box-sizing: border-box;
  747. display: flex;
  748. align-items: center;
  749. justify-content: center;
  750. padding: 0.28rem 0;
  751. box-sizing: border-box;
  752. > div {
  753. width: 4.61rem;
  754. height: 1.11rem;
  755. color: #ed5d18;
  756. border-radius: 0.11rem;
  757. border: 0.03rem solid #ed5d18;
  758. display: flex;
  759. align-items: center;
  760. justify-content: center;
  761. font-size: 0.39rem;
  762. &.mute_all {
  763. margin-right: 0.31rem;
  764. }
  765. }
  766. }
  767. }
  768. }
  769. .chat__area-layoutBox {
  770. display: block;
  771. width: 100%;
  772. height: auto;
  773. position: fixed;
  774. bottom: 0;
  775. left: 0;
  776. right: unset;
  777. top: unset;
  778. background: #fff;
  779. // padding-bottom: 0.821256rem;
  780. .chat__area-layoutBox_bg {
  781. width: 100vw;
  782. height: 100vh;
  783. position: fixed;
  784. z-index: 1;
  785. top: 0;
  786. left: 0;
  787. }
  788. .chat__area-l-content {
  789. display: -webkit-box;
  790. display: -ms-flexbox;
  791. display: flex;
  792. -webkit-box-orient: horizontal;
  793. -webkit-box-direction: normal;
  794. -ms-flex-direction: row;
  795. flex-direction: row;
  796. -webkit-box-align: center;
  797. -ms-flex-align: center;
  798. align-items: center;
  799. -webkit-box-pack: center;
  800. -ms-flex-pack: center;
  801. justify-content: center;
  802. min-height: 0.821256rem;
  803. padding: 0.241546rem 0;
  804. width: 100%;
  805. position: relative;
  806. z-index: 100;
  807. textarea {
  808. width: calc(100% - 0.96618rem);
  809. -ms-flex-preferred-size: calc(100% - 0.96618rem);
  810. flex-basis: calc(100% - 0.96618rem);
  811. background: none;
  812. border: none;
  813. border-radius: 0;
  814. color: #000;
  815. font-size: 0.386473rem;
  816. line-height: 0.483092rem;
  817. padding: 0 0.241546rem;
  818. resize: none;
  819. -webkit-user-select: text;
  820. caret-color: #ff4500;
  821. overflow: hidden !important;
  822. }
  823. }
  824. }
  825. @keyframes myAnimation {
  826. 0% {
  827. background-position: 0px 0px;
  828. background-size: 13.3344rem auto;
  829. }
  830. 100.00% {
  831. background-position: -13.1104rem 0px;
  832. background-size: 13.3344rem auto;
  833. }
  834. }
  835. }
  836. </style>