Commit 970292ee by pangchong

feat: 样式调整

parent 4da4d06d
<template>
<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>
</div>
<a-row class="mt-2 px-4">
......
<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">
<a-typography-paragraph editable v-model:editText="videoTitle">
{{ videoTitle }}
......@@ -15,28 +15,28 @@
</div>
</a-space>
</div>
<!-- 其余的视频窗口-->
<!-- 其余的视频窗口 -->
<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>
</template>
<script setup lang="ts">
import VideoSlider from './videoSlider.vue'
import VideoTools from './videoTools.vue'
import {allOtherChattersIdSet} from "AnyR/states/chatChannelStates";
import {computed, ref, onMounted} from "vue";
import { allOtherChattersIdSet } from 'AnyR/states/chatChannelStates'
import { computed, ref, onMounted } from 'vue'
const inCenterUserVideoId = ref('');
const inCenterUserVideoId = ref('')
onMounted(function () {
inCenterUserVideoId.value = allOtherChattersIdSet.value[0];
inCenterUserVideoId.value = allOtherChattersIdSet.value[0]
})
const userVideoContainerSet = computed(function () {
return {
onTopUserSet: allOtherChattersIdSet.value.filter((a: any) => a!==inCenterUserVideoId.value),
onTopUserSet: allOtherChattersIdSet.value.filter((a: any) => a !== inCenterUserVideoId.value),
inCenter: inCenterUserVideoId.value
}
})
......
<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="text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary">冯云</div>
<a-space :size="4">
......
<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="slider-container mb-1">
<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>
</div>
<!-- 往右 -->
......@@ -53,6 +53,7 @@ const getSliderWidth = computed(() => {
position: relative;
.slider-item {
width: v-bind('getSliderWidth');
height: 120px;
}
}
</style>
<template>
<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="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)">
......@@ -19,20 +19,20 @@
</div>
<div class="w-[120px] h-[72px] item" @click="toggleMute">
<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 class="w-[120px] h-[72px] item" @click="toggleVoiceChatOnly">
<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 class="w-[120px] h-[72px] item">-->
<!-- <global-icon icon="screenshot" :size="21"></global-icon>-->
<!-- <span class="mt-1 color-text-2">截图</span>-->
<!-- </div>-->
<!-- <div class="w-[120px] h-[72px] item">
<global-icon icon="screenshot" :size="21"></global-icon>
<span class="mt-1 color-text-2">截图</span>
</div> -->
<div class="w-[120px] h-[72px] item" @click="toggleScreenShare">
<global-icon icon="shared-screen" :size="21"></global-icon>
<span class="mt-1 color-text-2">
{{screenShareMetaData.byOther ? '他人正在共享' : screenShareMetaData.byCurrentUser ? '取消屏幕共享' : '屏幕共享'}}
{{ screenShareMetaData.byOther ? '他人正在共享' : screenShareMetaData.byCurrentUser ? '取消屏幕共享' : '屏幕共享' }}
</span>
</div>
<div class="w-[120px] h-[72px] item">
......@@ -48,11 +48,11 @@
</template>
<script setup lang="ts">
import {useAnyR} from "AnyR/index";
import {isUserHost} from "AnyR/states/chatChannelStates";
import {ref} from "vue"
import {isCurrentUserMuted} from "AnyR/states/chatChannelStates";
import {screenShareMetaData} from "AnyR/states/chatChannelStates";
import { useAnyR } from 'AnyR/index'
import { isUserHost } from 'AnyR/states/chatChannelStates'
import { ref } from 'vue'
import { isCurrentUserMuted } from 'AnyR/states/chatChannelStates'
import { screenShareMetaData } from 'AnyR/states/chatChannelStates'
const ps = defineProps<{
id: any
......@@ -60,15 +60,14 @@ const ps = defineProps<{
const isVoiceChatOnly = ref(false)
const AnyR = useAnyR();
const AnyR = useAnyR()
function toggleMute() {
AnyR?.agora.toggleMuteSelf()
}
function toggleScreenShare() {
if (screenShareMetaData.value.byOther)
return;
if (screenShareMetaData.value.byOther) return
const endHandle = () => {
AnyR?.agora.screenShareHandle()
}
......@@ -82,7 +81,7 @@ function allMute() {
function toggleVoiceChatOnly() {
isVoiceChatOnly.value = !isVoiceChatOnly.value
AnyR?.agora.toggleVoiceChatOnly(isVoiceChatOnly.value);
AnyR?.agora.toggleVoiceChatOnly(isVoiceChatOnly.value)
}
function endMeeting() {
......@@ -90,7 +89,7 @@ function endMeeting() {
}
function hangupCall() {
AnyR?.agora.hangUpCurrentCall();
AnyR?.agora.hangUpCurrentCall()
}
</script>
<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