12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046 |
- <template>
- <div id="PageRtcLive">
- <div class="member_number">
- <div class="members"></div>
- <span>{{ user_list.length }}观看</span>
- </div>
- <chat v-show="chatShow" :chatList="chatList" :user_info="user_info"></chat>
- <Trtccom :audioMuted="audioMuted" :videoMuted="videoMuted" v-if="isJoined" />
- <div class="contorlBar" v-if="!showInput">
- <div v-if="connectStatus == 1" :class="{ disabled: !user_info.IsWords }" class="saySomething" @click="onFocus">
- <!-- <i class="speakIcon"
- :class="{'dis':!user_info.IsWords}"></i> -->
- <span v-if="user_info.IsWords"> 说点什么 </span>
- <span v-if="!user_info.IsWords">已被禁言</span>
- <div class="disSpeakBtn" @click.stop="chatShow = !chatShow" :class="{ dis: !chatShow }"></div>
- </div>
- <div style="text-align: right; width: 100%" v-if="connectStatus == 0">连接中...</div>
- <div v-if="connectStatus == 1" class="contorl_btn">
- <div v-if="isBrushes && user_info.Role == 'leader'" @click="onDrawUndo" class="brushesBack" :class="{ disabled: !canUndo }"></div>
- <div v-if="user_info.Role == 'leader'" @click="onDraw(!isBrushes)" :class="{ brushesed: isBrushes }" class="brushes"></div>
- <div
- v-if="(user_list.length < 2 && mode == '1') || (mode == '2' && user_list.length < 30)"
- class="invitation"
- @click="openDialog('dialogShare', shareLink)"
- ></div>
- <div v-if="mode == '2' && role == 'leader'" class="members" @click="openMember"></div>
- <div v-if="!disableMic" @click="handleMuteAduio" :class="{ mic_off: audioMuted }" class="mic_on"></div>
- <div v-if="disableMic" class="mic_no"></div>
- <div v-if="role == 'leader'" @click="handleMuteVideo" :class="videoMuted ? 'video_no' : 'video_on'"></div>
- <div class="exit" @click="openDialog('dialogIndex')"></div>
- </div>
- </div>
- <div class="layer" v-if="showInput" @click="closeInput">
- <div class="inputBox" @click.stop>
- <div class="msgBox">
- <input id="input_msg" type="text" maxlength="200" v-model.trim="text" :placeholder="`说点什么~`" />
- <span class="iconsend_icon" :class="{ disable: text == '' }" @click.stop="sendText">发送</span>
- </div>
- </div>
- </div>
- <!-- 成员 -->
- <div class="layer" v-if="showMember" @click.self="closeMember">
- <div class="memberContent animated" :class="animateActive ? 'fadeInUpBig' : 'fadeOutDownBig'">
- <div class="blurBox"></div>
- <div class="content">
- <div class="memberHeader">
- <span> 成员管理({{ user_list.length }})</span>
- <i class="iconfont"></i>
- </div>
- <div class="memberList">
- <div class="memberItem">
- <div class="userMsg">
- <div class="avatar">
- <img :src="require('@/assets/images/rtcLive/avatar_small@2x.png')" alt="" />
- </div>
- <div class="name" v-if="user_info.Role == 'leader'">{{ user_info.Nickname }} (主持人,我)</div>
- <div class="name" v-else>{{ user_info.Nickname }} (我)</div>
- </div>
- <div class="button" v-if="user_info.Role == 'leader'">
- <!-- <div class="outBtn iconfont iconremove"></div> -->
- <!-- <div v-if="audioDevices.length>0" class="micBtn iconfont" @click="changeMedia('audio',hideMic)" :class="user_info.muted ?'iconmic_off':'iconmic_on'"></div>
- <div v-else class="micBtn iconfont iconmic_off"></div> -->
- <div @click="setAllMuted(!all_mute_mic)" class="micBtn mute_all_mic" :class="{ open_all_mic: all_mute_mic }"></div>
- </div>
- </div>
- <div v-show="user_info.UserId != i.UserId && i.Role != 'leader'" class="memberItem" v-for="(i, idx) in user_list" :key="i.UserId">
- <div class="userMsg">
- <div class="avatar">
- <img :src="require('@/assets/images/rtcLive/avatar_small@2x.png')" alt="" />
- </div>
- <div class="name">{{ i.Nickname }}</div>
- </div>
- <div class="button" v-if="user_info.Role == 'leader'">
- <div class="micBtn" :class="i.IsWords ? 'ban_speak_on' : 'ban_speak_off'" @click="userCanSpeak(i)"></div>
- <div class="outBtn icon_remove" @click="userGetOut(i, idx)"></div>
- <div class="micBtn" :class="i.IsMuted ? 'mute_one_mic_off' : 'mute_one_mic_on'" @click="onMemberMuted(i)"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- import { onMounted, watch, defineEmits, ref, reactive, computed, nextTick } from "vue";
- import { useApp, getApp } from "@/app";
- import { useStore } from "vuex";
- import { Scrollbar, Dialog } from "@/global_components/";
- import common from "@/utils/common";
- import { mapGetters } from "vuex";
- import chat from "./chat/chat.vue";
- import Trtccom from "./Trtccom.vue";
- import browser from "@/utils/browser";
- const emit = defineEmits(["openDialog"]);
- const store = useStore();
- let chatAutoScroll = () => {
- let el = document.getElementById("chat");
- let client_h = document.getElementById("chat").clientHeight;
- let all = document.getElementById("contents").clientHeight;
- el.scrollTo(0, client_h + all);
- };
- let createSocket = (config) => {
- console.log(process.env.VUE_APP_SOCKET_URL, "process.env.VUE_APP_SOCKET_URL");
- var socket = io(process.env.VUE_APP_SOCKET_URL, {
- path: "/ws-sync",
- transports: ["websocket"],
- });
- return socket;
- };
- store.commit("rtc/setSocket", createSocket());
- let getUrl = (href, queryArr) => {
- queryArr.forEach((item) => {
- if (!browser.hasURLParam(item.key)) {
- href += `&${item.key}=${item.val}`;
- } else {
- href = browser.replaceQueryString(href, item.key, item.val);
- }
- });
- return href;
- };
- const connectStatus = ref(0);
- const isBrushes = ref(false);
- const showInput = ref(false);
- const showMember = ref(false);
- const animateActive = ref(false);
- const audioMuted = ref(false);
- const videoMuted = ref(false);
- const socket = computed(() => store.getters["rtc/socket"]);
- const myVideoShow = ref(false);
- const userVideoShow = ref(false);
- const user_info = ref({});
- const user_list = ref([]);
- const mode = ref(browser.getURLParam("mode"));
- const role = ref(browser.getURLParam("role"));
- const userId = computed(() => store.getters["rtc/userId"]);
- const roomId = computed(() => store.getters["rtc/roomId"]);
- const isJoined = ref(false);
- const paint = reactive({});
- const chatList = ref([]);
- const text = ref("");
- const shareLink = ref("");
- const canUndo = ref(false);
- const audioDevices = ref([1]);
- const videoDevices = ref([1]);
- const disableMic = ref(false);
- const chatShow = ref(true);
- const all_mute_mic = ref(false);
- const userGetOut = (item, i) => {
- socket.value &&
- socket.value.emit("action", {
- type: "getout",
- data: {
- id: item.UserId,
- },
- });
- user_list.value = user_list.value.splice(i, 1);
- };
- const setUserWords = (res) => {
- if (res.userId == user_info.value.UserId) {
- user_info.value.IsWords = res.words;
- }
- };
- const handleMuteVideo = () => {
- videoMuted.value = !videoMuted.value;
- };
- const handleMuteAduio = () => {
- audioMuted.value = !audioMuted.value;
- };
- const setUserMuted = (res) => {
- if(res.userId){
- if (res.userId == user_info.value.UserId) {
- user_info.value.IsMuted = res.muted;
- disableMic.value = res.muted;
- audioMuted.value = res.muted;
- }
- }else{
- onAllMuted(res)
- }
- };
- const setAllMuted = (data) => {
- console.log(data,'IsMuted');
- socket.value.emit("action", { type: "users-muted", muted: data});
- };
- const onAllMuted = (res) => {
- user_list.value = res.members.reduce(function (tempArr, item) {
- if (tempArr.findIndex((ele) => ele.UserId === item.UserId) === -1) {
- tempArr.push(item);
- }
- return tempArr;
- }, []);
- if (role.value == "leader") {
- all_mute_mic.value = res.muted;
- }
- user_list.value.forEach((item) => {
- user_info.value.IsMuted = res.muted;
- disableMic.value = res.muted;
- audioMuted.value = res.muted;
- item.IsMuted = res.muted;
- });
- };
- //用戶加入
- const setUserJoin = async (res) => {
- console.log("有人进来了", res);
- // self.user_info = res.user;
- user_list.value = res.members.reduce(function (tempArr, item) {
- if (tempArr.findIndex((ele) => ele.UserId === item.UserId) === -1) {
- tempArr.push(item);
- }
- return tempArr;
- }, []);
- // self.chekcLeaderInfo();
- let name = res.user.Nickname;
- if (res.user.Role == "leader") {
- name = "主持人";
- Dialog.toast({ content: `主持人进入房间` });
- }
- let data = {
- role: res.user.Role,
- mode: mode.value,
- Nickname: name,
- UserId: res.user.UserId,
- text: "进入房间",
- };
- chatList.value.push(data);
- await nextTick();
- try {
- chatAutoScroll();
- } catch (error) {}
- };
- const onDrawUndo = async () => {
- let app = await getApp();
- app.Connect.paint.undo();
- canUndo.value = app.Connect.paint.records.length > 0;
- console.log(app.Connect.paint.records, "app.Connect.paint.records");
- };
- // 画笔开启
- const onDraw = async (status) => {
- isBrushes.value = status;
- if (isBrushes.value) {
- await getApp().Connect.paint.show({ role: role.value, paint: role.value == "leader" ? true : false });
- if (role.value == "leader") {
- socket.value.emit("action", { type: "user-paint", open: true });
- }
- } else {
- await getApp().Connect.paint.hide();
- if (role.value == "leader") {
- socket.value.emit("action", { type: "user-paint", open: false });
- }
- }
- };
- //打开输入框
- const onFocus = () => {
- showInput.value = true;
- nextTick(() => {
- let input_msg = document.getElementById("input_msg");
- input_msg.focus();
- });
- };
- //发弹幕
- const sendText = async () => {
- if (text.value == "") {
- return;
- }
- let data = {
- role: role.value,
- mode: mode.value,
- Nickname: user_info.value.Nickname,
- UserId: user_info.value.UserId,
- text: text.value,
- };
- socket.value &&
- socket.value.emit("action", {
- type: "danmumsg",
- data,
- });
- chatList.value.push(data);
- await nextTick();
- try {
- chatAutoScroll();
- let input_msg = document.getElementById("input_msg");
- input_msg.blur();
- } catch (error) {}
- closeInput();
- };
- //接收消息
- const setReceiveMsg = async (res) => {
- console.log(res);
- if (res.role == "leader") {
- res.Nickname = "主持人";
- }
- chatList.value.push(res);
- await nextTick();
- try {
- chatAutoScroll();
- } catch (error) {}
- };
- // 关闭输入框
- const closeInput = () => {
- showInput.value = false;
- text.value = "";
- };
- // 开启成员
- const openMember = () => {
- showMember.value = true;
- animateActive.value = true;
- };
- // 关闭成员
- const closeMember = () => {
- animateActive.value = false;
- let t = setTimeout(() => {
- clearTimeout(t);
- showMember.value = false;
- }, 200);
- };
- const openDialog = (str, link) => {
- emit("openDialog", str, link);
- };
- const onMemberMuted = (item) => {
- item.IsMuted = !item.IsMuted;
- socket.value.emit("action", { type: "users-muted", muted: item.IsMuted, userId: item.UserId });
- };
- const onMemberLeave = (res) => {
- console.log("有人离开了", res);
- user_list.value = res.members.reduce(function (tempArr, item) {
- if (tempArr.findIndex((ele) => ele.UserId === item.UserId) === -1) {
- tempArr.push(item);
- }
- return tempArr;
- }, []);
- if (res.user.Role == "leader") {
- Dialog.toast({ content: `主持人离开了房间` });
- // emit("closeSocket");
- }
- };
- const userCanSpeak = (item) => {
- item.IsWords = !item.IsWords;
- socket.value.emit("action", { type: "users-words", words: item.IsWords, userId: item.UserId });
- };
- const onGetOuT = (data) => {
- if (data.id == user_info.UserId) {
- emit("closeSocket");
- Dialog.toast({ content: `你已被移除` });
- }
- };
- const startFollow = (app) => {
- app.Connect.follow.start({ follow: role.value == "customer" });
- store.commit("rtc/setUserId", browser.getURLParam("userId") || `user_${Math.floor(Math.random() * 100000000)}`);
- store.commit("rtc/setRoomId", browser.getURLParam("roomId") || Math.floor(Math.random() * 100000000));
- socket.value.on("connect", () => {
- socket.value.emit("join", {
- userId: userId.value,
- roomId: roomId.value,
- role: role.value || "leader",
- nickname: browser.getURLParam("name") || common.uuid(12),
- });
- });
- // 加入房间成功
- socket.value.on("join", (data) => {
- connectStatus.value = 1;
- if (role.value == "customer") {
- socket.value.emit("action", { type: "user-init" });
- }
- isJoined.value = true;
- user_info.value = data.user;
- user_list.value = data.members.reduce(function (tempArr, item) {
- if (tempArr.findIndex((ele) => ele.UserId === item.UserId) === -1) {
- tempArr.push(item);
- }
- return tempArr;
- }, []);
- //更新分享链接
- shareLink.value = getUrl(window.location.href, [
- {
- key: "mode",
- val: mode.value,
- },
- {
- key: "name",
- val: "",
- },
- {
- key: "userId",
- val: "",
- },
- {
- key: "role",
- val: "customer",
- },
- {
- key: "roomId",
- val: user_info.value.RoomId,
- },
- ]);
- let tmp = "";
- if (user_info.value.Role == "leader") {
- tmp = getUrl(window.location.href, [
- {
- key: "roomId",
- val: user_info.value.RoomId,
- },
- {
- key: "userId",
- val: user_info.value.UserId,
- },
- ]);
- } else {
- tmp = getUrl(window.location.href, [
- {
- key: "userId",
- val: user_info.value.UserId,
- },
- ]);
- }
- history.replaceState(null, null, tmp);
- });
- socket.value.on("action", (data) => {
- if (data.type == "error") {
- Dialog.toast({ content: `房间未找到`, type: "error" });
- emit("closeSocket");
- } else if (data.type == "danmumsg") {
- setReceiveMsg(data.data);
- } else if (data.type == "getout") {
- onGetOuT(data);
- } else if (data.type == "user-init") {
- app.Connect.follow.sync();
- } else if (data.type == "user-paint") {
- onDraw(data.open);
- if (role.value == "customer") {
- if (data.open) {
- Dialog.toast({ content: `主持人开启画笔` });
- } else {
- Dialog.toast({ content: `主持人关闭画笔` });
- }
- }
- } else if (data.type == "user-join") {
- setUserJoin(data);
- } else if (data.type == "users-muted") {
- setUserMuted(data);
- //閉麥
- } else if (data.type == "users-words") {
- setUserWords(data);
- //禁言
- } else if (data.type == "user-leave") {
- // 房间解散
- onMemberLeave(data);
- }
- });
- // 同屏带看
- socket.value.on("sync", (data) => {
- if (role.value == "customer") {
- app.Connect.follow.receive(data);
- }
- });
- // 画笔
- socket.value.on("paint", (data) => {
- if (role.value == "customer") {
- app.Connect.paint.receive(data);
- }
- });
- };
- onMounted(() => {
- useApp().then((app) => {
- startFollow(app);
- app.Connect.follow.on("data", (data) => {
- if (isJoined.value) {
- socket.value.emit("sync", data);
- }
- });
- app.Connect.paint.on("data", (data) => {
- canUndo.value = app.Connect.paint.records.length > 0;
- socket.value.emit("paint", data);
- });
- });
- });
- </script>
- <style scoped lang="scss">
- #PageRtcLive {
- position: absolute;
- left: 0;
- bottom: 0;
- // height: 7.31rem;
- width: 100%;
- z-index: 999;
- // background: rgba(0, 0, 0, 0.1);
- padding: 0 0.44rem;
- box-sizing: border-box;
- // pointer-events: none;
- .member_number {
- // width: 1.67rem;
- height: 0.5rem;
- background: rgba(0, 0, 0, 0.3);
- border-radius: 0.25rem;
- position: fixed;
- top: 0.56rem;
- right: 0.44rem;
- padding: 0.07rem 0.17rem;
- display: flex;
- align-items: center;
- justify-content: center;
- .members {
- width: 0.42rem;
- height: 0.42rem;
- background: url(~@/assets/images/rtcLive/members@2x.png);
- background-size: 100% 100%;
- margin-right: 0.07rem;
- }
- span {
- font-size: 0.24rem;
- color: #fff;
- }
- }
- .contorlBar {
- width: 9.51rem;
- height: 1.173333rem;
- background: rgba(0, 0, 0, 0.5);
- border-radius: 0.67rem;
- border: 0.03rem solid rgba(255, 255, 255, 0.1);
- margin: 0.67rem auto 0;
- // position: absolute;
- position: fixed;
- z-index: 9999;
- left: 50%;
- transform: translateX(-50%);
- padding: 0 0.266667rem;
- box-sizing: border-box;
- bottom: 0.94rem;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .saySomething {
- color: #fff;
- // font-size: 0.42rem;
- height: 0.8rem;
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- background: rgba(0, 0, 0, 0.5);
- padding: 0 0.2rem 0 0.2rem;
- border-radius: 0.64rem;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .disSpeakBtn {
- width: 0.533333rem;
- height: 0.533333rem;
- background: url(~@/assets/images/rtcLive/pop-up_screen_on@2x.png) no-repeat;
- background-size: 100% 100%;
- cursor: pointer;
- &.dis {
- background: url(~@/assets/images/rtcLive/pop-up_screen_off@2x.png) no-repeat;
- background-size: 100% 100%;
- }
- }
- .speakIcon {
- width: 0.32rem;
- height: 0.32rem;
- background: url(~@/assets/images/rtcLive/Input_norma@2x.png);
- background-size: 100% 100%;
- display: block;
- margin-right: 0.1rem;
- &.dis {
- background: url(~@/assets/images/rtcLive/Input_disabled@2x.png);
- background-size: 100% 100%;
- }
- }
- span {
- font-size: 0.266667rem;
- }
- // &::after {
- // content: "";
- // position: absolute;
- // width: 0.04rem;
- // height: 0.44rem;
- // background: #ffffff;
- // border-radius: 0.03rem;
- // top: 50%;
- // transform: translateY(-50%);
- // right: -0.28rem;
- // }
- }
- .contorl_btn {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-left: 0.2rem;
- > div {
- // width: 0.56rem;
- // height: 0.56rem;
- width: 0.65rem;
- height: 0.65rem;
- // font-size: 0.56rem;
- // background: #FD5151;
- margin-right: 0.33rem;
- // &.iconexit {
- // // width: 0.56rem;
- // // height: 0.56rem;
- // color: #fd5151;
- // // background: #fff;
- // // border-radius: 50%;
- // // overflow: hidden;
- // }
- &.brushesBack {
- background: url(~@/assets/images/rtcLive/revocation@2x.png);
- background-size: 100% 100%;
- }
- &.brushes {
- // background: url(~@/assets/images/rtcLive/brushes@2x.png);
- background: url(~@/assets/images/rtcLive/brushes@2x.png);
- background-size: 100% 100%;
- }
- &.brushesed {
- background: url(~@/assets/images/rtcLive/brushes_selected@2_1.png);
- background-size: 100% 100%;
- }
- &.invitation {
- background: url(~@/assets/images/rtcLive/invitation@2x.png);
- background-size: 100% 100%;
- }
- &.members {
- background: url(~@/assets/images/rtcLive/members@2x.png);
- background-size: 100% 100%;
- }
- &.mic_on {
- background: url(~@/assets/images/rtcLive/mic_on@2x.png);
- background-size: 100% 100%;
- }
- &.mic_no {
- background: url(~@/assets/images/rtcLive/mic_off_50@2x.png);
- background-size: 100% 100%;
- }
- &.mic_off {
- background: url(~@/assets/images/rtcLive/mic_off@2x.png);
- background-size: 100% 100%;
- }
- &.video_on {
- background: url(~@/assets/images/rtcLive/video_on@2x.png);
- background-size: 100% 100%;
- }
- &.video_no {
- background: url(~@/assets/images/rtcLive/video_off_50@2x.png);
- background-size: 100% 100%;
- }
- &.video_off {
- background: url(~@/assets/images/rtcLive/video_off@2x.png);
- background-size: 100% 100%;
- }
- &.exit {
- background: url(~@/assets/images/rtcLive/exit@2x.png);
- background-size: 100% 100%;
- }
- &:last-child {
- margin-right: 0;
- }
- }
- }
- }
- .layer {
- width: 100vw;
- height: 100vh;
- background: rgba(0, 0, 0, 0.1);
- z-index: 10000;
- position: fixed;
- bottom: 0;
- left: 0;
- // right: unset;
- // top: unset;
- .inputBox {
- width: 100vw;
- height: 1.39rem;
- // background: #f2f2f2;
- border: 1px solid rgba(255, 255, 255, 0.1);
- background: rgba(0, 0, 0, 0.5);
- position: absolute;
- bottom: 0;
- left: 0;
- padding: 0 0.44rem;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- .msgBox {
- width: 9.53rem;
- height: 0.94rem;
- position: absolute;
- > input {
- width: 9.53rem;
- height: 0.94rem;
- background: rgba(0, 0, 0, 0.5);
- border-radius: 0.56rem;
- font-size: 0.42rem;
- padding: 0 1.6rem 0 0.44rem;
- box-sizing: border-box;
- border: none;
- outline: none;
- color: #fff;
- resize: none;
- line &::placeholder {
- color: rgba(255, 255, 255, 0.5);
- }
- }
- .iconfont {
- // width: 0.56rem;
- // height: 0.56rem;
- // background: #ed5d18;
- font-size: 0.56rem;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- right: 0.78rem;
- color: #fff;
- &.active {
- color: #ed5d18;
- }
- }
- .iconsend_icon {
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- // right: 0.78rem;
- right: 0.106667rem;
- width: 1.28rem;
- height: 0.693333rem;
- background: #ed5d18;
- color: #fff;
- font-size: 0.32rem;
- text-align: center;
- line-height: 0.693333rem;
- border-radius: 0.533333rem;
- // width: 0.67rem;
- // height: 0.67rem;
- // background-image: url(~@/assets/images/rtcLive/send_selected@2x.png);
- // background-size: 100% 100%;
- }
- }
- }
- .memberContent {
- height: auto;
- width: 100%;
- // background: #ffffff;
- border-radius: 0.28rem 0.28rem 0px 0px;
- position: absolute;
- left: 0;
- bottom: 0;
- &.animated {
- animation-duration: 0.3s;
- }
- .blurBox {
- background: rgba(0, 0, 0, 0.9);
- border-radius: 0.14rem 0.14rem 0px 0px;
- filter: blur(1px);
- position: absolute;
- width: 100%;
- height: 100%;
- z-index: 1;
- top: 0;
- left: 0;
- }
- .content {
- position: relative;
- width: 100%;
- height: 100%;
- z-index: 2;
- top: 0;
- left: 0;
- }
- .memberHeader {
- width: 100%;
- height: 1.28rem;
- text-align: center;
- line-height: 1.28rem;
- > span {
- font-size: 0.42rem;
- color: #fff;
- }
- }
- .memberList {
- width: 100%;
- height: 8.33rem;
- border-top-style: solid;
- border-top-color: rgba(0, 0, 0, 0.1);
- border-top-width: 1px;
- border-bottom-style: solid;
- border-bottom-color: rgba(0, 0, 0, 0.1);
- border-bottom-width: 1px;
- box-sizing: border-box;
- overflow-y: auto;
- &::-webkit-scrollbar {
- display: none;
- }
- .memberItem {
- width: 100%;
- height: 1.39rem;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0.19rem 0.44rem;
- .userMsg {
- display: flex;
- align-items: center;
- justify-content: center;
- .avatar {
- width: 1rem;
- height: 1rem;
- border-radius: 50%;
- // overflow: hidden;
- margin-right: 0.28rem;
- > img {
- // width: 100%;
- // height: 100%;
- width: 1rem;
- height: 1rem;
- }
- }
- .name {
- font-size: 0.39rem;
- color: #fff;
- }
- }
- .button {
- display: flex;
- align-items: center;
- justify-content: center;
- > div {
- // width: 0.56rem;
- // height: 0.56rem;
- // background: #fc6970;
- font-size: 0.65rem;
- color: #fff;
- &.micBtn {
- width: 0.65rem;
- height: 0.65rem;
- margin-right: 0.3rem;
- &.mute_all_mic {
- background-image: url(~@/assets/images/rtcLive/mic_all_on@2x.png);
- background-size: 100% 100%;
- }
- &.open_all_mic {
- background-image: url(~@/assets/images/rtcLive/mic_all_off@2x.png);
- background-size: 100% 100%;
- }
- &.mute_one_mic_on {
- background-image: url(~@/assets/images/rtcLive/mic_on@2x.png);
- background-size: 100% 100%;
- }
- &.mute_one_mic_off {
- background-image: url(~@/assets/images/rtcLive/mic_off@2x.png);
- background-size: 100% 100%;
- }
- &.ban_speak_on {
- background-image: url(~@/assets/images/rtcLive/chat_on@2x.png);
- background-size: 100% 100%;
- }
- &.ban_speak_off {
- background-image: url(~@/assets/images/rtcLive/chat_off@2x.png);
- background-size: 100% 100%;
- }
- }
- &.outBtn {
- margin-right: 0.3rem;
- width: 0.65rem;
- height: 0.65rem;
- &.icon_remove {
- background-image: url(~@/assets/images/rtcLive/remove@2x.png);
- background-size: 100% 100%;
- }
- }
- }
- }
- }
- }
- .memberBottom {
- width: 100%;
- padding: 0 0.44rem;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 0.28rem 0;
- box-sizing: border-box;
- > div {
- width: 4.61rem;
- height: 1.11rem;
- color: #ed5d18;
- border-radius: 0.11rem;
- border: 0.03rem solid #ed5d18;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 0.39rem;
- &.mute_all {
- margin-right: 0.31rem;
- }
- }
- }
- }
- }
- .chat__area-layoutBox {
- display: block;
- width: 100%;
- height: auto;
- position: fixed;
- bottom: 0;
- left: 0;
- right: unset;
- top: unset;
- background: #fff;
- // padding-bottom: 0.821256rem;
- .chat__area-layoutBox_bg {
- width: 100vw;
- height: 100vh;
- position: fixed;
- z-index: 1;
- top: 0;
- left: 0;
- }
- .chat__area-l-content {
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-orient: horizontal;
- -webkit-box-direction: normal;
- -ms-flex-direction: row;
- flex-direction: row;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: center;
- -ms-flex-pack: center;
- justify-content: center;
- min-height: 0.821256rem;
- padding: 0.241546rem 0;
- width: 100%;
- position: relative;
- z-index: 100;
- textarea {
- width: calc(100% - 0.96618rem);
- -ms-flex-preferred-size: calc(100% - 0.96618rem);
- flex-basis: calc(100% - 0.96618rem);
- background: none;
- border: none;
- border-radius: 0;
- color: #000;
- font-size: 0.386473rem;
- line-height: 0.483092rem;
- padding: 0 0.241546rem;
- resize: none;
- -webkit-user-select: text;
- caret-color: #ff4500;
- overflow: hidden !important;
- }
- }
- }
- @keyframes myAnimation {
- 0% {
- background-position: 0px 0px;
- background-size: 13.3344rem auto;
- }
- 100% {
- background-position: -13.1104rem 0px;
- background-size: 13.3344rem auto;
- }
- }
- }
- </style>
|