Commit 970292ee by pangchong

feat: 样式调整

parent 4da4d06d
<template> <template>
<div class="g-block ml-4 pb-0"> <div class="g-block ml-4 pb-0">
<div class="px-4"> <div class="px-4 h-[300px]">
<video-item :is-self="true" :id="''"></video-item> <video-item :is-self="true" :id="''"></video-item>
</div> </div>
<a-row class="mt-2 px-4"> <a-row class="mt-2 px-4">
......
<template> <template>
<div class="g-block ml-4 overflow-y-auto"> <div class="g-block ml-4">
<div class="flex justify-between items-center mb-4 px-4"> <div class="flex justify-between items-center mb-4 px-4">
<a-typography-paragraph editable v-model:editText="videoTitle"> <a-typography-paragraph editable v-model:editText="videoTitle">
{{ videoTitle }} {{ videoTitle }}
...@@ -15,28 +15,28 @@ ...@@ -15,28 +15,28 @@
</div> </div>
</a-space> </a-space>
</div> </div>
<!-- 其余的视频窗口--> <!-- 其余的视频窗口 -->
<video-slider class="mb-3 px-4" :id-set="userVideoContainerSet.onTopUserSet"></video-slider> <video-slider class="mb-3 px-4" :id-set="userVideoContainerSet.onTopUserSet"></video-slider>
<!-- 放大的窗口--> <!-- 放大的窗口 -->
<video-tools :id="userVideoContainerSet.inCenter" class="px-4"></video-tools> <video-tools :id="userVideoContainerSet.inCenter" class="px-4 flex flex-col flex-auto"></video-tools>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import VideoSlider from './videoSlider.vue' import VideoSlider from './videoSlider.vue'
import VideoTools from './videoTools.vue' import VideoTools from './videoTools.vue'
import {allOtherChattersIdSet} from "AnyR/states/chatChannelStates"; import { allOtherChattersIdSet } from 'AnyR/states/chatChannelStates'
import {computed, ref, onMounted} from "vue"; import { computed, ref, onMounted } from 'vue'
const inCenterUserVideoId = ref(''); const inCenterUserVideoId = ref('')
onMounted(function () { onMounted(function () {
inCenterUserVideoId.value = allOtherChattersIdSet.value[0]; inCenterUserVideoId.value = allOtherChattersIdSet.value[0]
}) })
const userVideoContainerSet = computed(function () { const userVideoContainerSet = computed(function () {
return { return {
onTopUserSet: allOtherChattersIdSet.value.filter((a: any) => a!==inCenterUserVideoId.value), onTopUserSet: allOtherChattersIdSet.value.filter((a: any) => a !== inCenterUserVideoId.value),
inCenter: inCenterUserVideoId.value inCenter: inCenterUserVideoId.value
} }
}) })
......
<template> <template>
<div class="relative" :id="ps.isSelf ? 'LocalVideo' : `RemoteVideo${ps.id}`" style="height: 300px;"> <div class="relative h-full" :id="ps.isSelf ? 'LocalVideo' : `RemoteVideo${ps.id}`">
<div class="absolute flex justify-between items-center p-1 top-0 left-0 w-full z-10"> <div class="absolute flex justify-between items-center p-1 top-0 left-0 w-full z-10">
<div class="text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary">冯云</div> <div class="text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary">冯云</div>
<a-space :size="4"> <a-space :size="4">
......
<template> <template>
<a-space class="justify-center"> <a-space class="justify-center" v-if="idSet.length">
<!-- 往左 --> <!-- 往左 -->
<div class="cursor-pointer" @click="slideLeft"><icon-left /></div> <div class="cursor-pointer" @click="slideLeft"><icon-left /></div>
<div class="slider-container mb-1"> <div class="slider-container mb-1">
<a-space class="slider-content overflow-y-hidden" :size="8" :style="sliderStyles"> <a-space class="slider-content overflow-y-hidden" :size="8" :style="sliderStyles">
<video-item class="slider-item" v-for="item in ps.idSet" :key="item" :is-self="false" :id="item"></video-item> <video-item class="slider-item" v-for="item in idSet" :key="item" :is-self="false" :id="item"></video-item>
</a-space> </a-space>
</div> </div>
<!-- 往右 --> <!-- 往右 -->
...@@ -53,6 +53,7 @@ const getSliderWidth = computed(() => { ...@@ -53,6 +53,7 @@ const getSliderWidth = computed(() => {
position: relative; position: relative;
.slider-item { .slider-item {
width: v-bind('getSliderWidth'); width: v-bind('getSliderWidth');
height: 120px;
} }
} }
</style> </style>
<template> <template>
<div> <div>
<div class="relative mb-4" style="height: 300px" :id="`RemoteVideo${ps.id}`"> <div class="relative mb-4 flex-auto" :id="`RemoteVideo${ps.id}`">
<div class="absolute flex justify-between items-center p-1 t-0 l-0 w-full z-10"> <div class="absolute flex justify-between items-center p-1 t-0 l-0 w-full z-10">
<div class="text-xs px-2 rounded-sm leading-5" style="background-color: rgb(var(--success-1)); color: rgb(var(--success-6))">吴彦谦</div> <div class="text-xs px-2 rounded-sm leading-5" style="background-color: rgb(var(--success-1)); color: rgb(var(--success-6))">吴彦谦</div>
<div class="rounded-full size-6 flex-center" style="background-color: var(--color-border-1)"> <div class="rounded-full size-6 flex-center" style="background-color: var(--color-border-1)">
...@@ -19,20 +19,20 @@ ...@@ -19,20 +19,20 @@
</div> </div>
<div class="w-[120px] h-[72px] item" @click="toggleMute"> <div class="w-[120px] h-[72px] item" @click="toggleMute">
<global-icon icon="mic" :size="21"></global-icon> <global-icon icon="mic" :size="21"></global-icon>
<span class="mt-1 color-text-2">{{isCurrentUserMuted ? '取消静音' : "静音"}}</span> <span class="mt-1 color-text-2">{{ isCurrentUserMuted ? '取消静音' : '静音' }}</span>
</div> </div>
<div class="w-[120px] h-[72px] item" @click="toggleVoiceChatOnly"> <div class="w-[120px] h-[72px] item" @click="toggleVoiceChatOnly">
<global-icon icon="swap" :size="21"></global-icon> <global-icon icon="swap" :size="21"></global-icon>
<span class="mt-1 color-text-2">{{isVoiceChatOnly ? '视频模式' : "语音模式"}}</span> <span class="mt-1 color-text-2">{{ isVoiceChatOnly ? '视频模式' : '语音模式' }}</span>
</div> </div>
<!-- <div class="w-[120px] h-[72px] item">--> <!-- <div class="w-[120px] h-[72px] item">
<!-- <global-icon icon="screenshot" :size="21"></global-icon>--> <global-icon icon="screenshot" :size="21"></global-icon>
<!-- <span class="mt-1 color-text-2">截图</span>--> <span class="mt-1 color-text-2">截图</span>
<!-- </div>--> </div> -->
<div class="w-[120px] h-[72px] item" @click="toggleScreenShare"> <div class="w-[120px] h-[72px] item" @click="toggleScreenShare">
<global-icon icon="shared-screen" :size="21"></global-icon> <global-icon icon="shared-screen" :size="21"></global-icon>
<span class="mt-1 color-text-2"> <span class="mt-1 color-text-2">
{{screenShareMetaData.byOther ? '他人正在共享' : screenShareMetaData.byCurrentUser ? '取消屏幕共享' : '屏幕共享'}} {{ screenShareMetaData.byOther ? '他人正在共享' : screenShareMetaData.byCurrentUser ? '取消屏幕共享' : '屏幕共享' }}
</span> </span>
</div> </div>
<div class="w-[120px] h-[72px] item"> <div class="w-[120px] h-[72px] item">
...@@ -48,11 +48,11 @@ ...@@ -48,11 +48,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {useAnyR} from "AnyR/index"; import { useAnyR } from 'AnyR/index'
import {isUserHost} from "AnyR/states/chatChannelStates"; import { isUserHost } from 'AnyR/states/chatChannelStates'
import {ref} from "vue" import { ref } from 'vue'
import {isCurrentUserMuted} from "AnyR/states/chatChannelStates"; import { isCurrentUserMuted } from 'AnyR/states/chatChannelStates'
import {screenShareMetaData} from "AnyR/states/chatChannelStates"; import { screenShareMetaData } from 'AnyR/states/chatChannelStates'
const ps = defineProps<{ const ps = defineProps<{
id: any id: any
...@@ -60,15 +60,14 @@ const ps = defineProps<{ ...@@ -60,15 +60,14 @@ const ps = defineProps<{
const isVoiceChatOnly = ref(false) const isVoiceChatOnly = ref(false)
const AnyR = useAnyR(); const AnyR = useAnyR()
function toggleMute() { function toggleMute() {
AnyR?.agora.toggleMuteSelf() AnyR?.agora.toggleMuteSelf()
} }
function toggleScreenShare() { function toggleScreenShare() {
if (screenShareMetaData.value.byOther) if (screenShareMetaData.value.byOther) return
return;
const endHandle = () => { const endHandle = () => {
AnyR?.agora.screenShareHandle() AnyR?.agora.screenShareHandle()
} }
...@@ -82,7 +81,7 @@ function allMute() { ...@@ -82,7 +81,7 @@ function allMute() {
function toggleVoiceChatOnly() { function toggleVoiceChatOnly() {
isVoiceChatOnly.value = !isVoiceChatOnly.value isVoiceChatOnly.value = !isVoiceChatOnly.value
AnyR?.agora.toggleVoiceChatOnly(isVoiceChatOnly.value); AnyR?.agora.toggleVoiceChatOnly(isVoiceChatOnly.value)
} }
function endMeeting() { function endMeeting() {
...@@ -90,7 +89,7 @@ function endMeeting() { ...@@ -90,7 +89,7 @@ function endMeeting() {
} }
function hangupCall() { function hangupCall() {
AnyR?.agora.hangUpCurrentCall(); AnyR?.agora.hangUpCurrentCall()
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment