Commit 82bcd230 by pangchong

Merge branch 'master' of 122.112.146.86:qlintonger/standalone-anyremote

parents 5673731d 79e6572a
...@@ -41,7 +41,7 @@ export class Agora { ...@@ -41,7 +41,7 @@ export class Agora {
console.log('开始订阅远端用户', user, mediaType, foundUser); console.log('开始订阅远端用户', user, mediaType, foundUser);
const remoteUserIdInThisUser = this.remotePlayerPrefix + user.uid; const remoteUserIdInThisUser = this.remotePlayerPrefix + user.uid;
if (mediaType === 'video') { if (mediaType === 'video') {
user?.videoTrack?.play(remoteUserIdInThisUser, {fit: 'contain', mirror: 'false'}); user?.videoTrack?.play(remoteUserIdInThisUser, {fit: 'contain', mirror: 'true'});
} }
if (mediaType === 'audio') { if (mediaType === 'audio') {
user?.audioTrack?.play(); user?.audioTrack?.play();
...@@ -171,7 +171,7 @@ export class Agora { ...@@ -171,7 +171,7 @@ export class Agora {
async forceReplay(id, vid) { async forceReplay(id, vid) {
const foundUser = this.AgoraClient.remoteUsers.find(i => i.uid.toString() === id.toString()); const foundUser = this.AgoraClient.remoteUsers.find(i => i.uid.toString() === id.toString());
console.log('强制播放用户', foundUser) console.log('强制播放用户', foundUser)
await foundUser?.videoTrack?.play(vid, {fit: 'contain', mirror: 'false'}); await foundUser?.videoTrack?.play(vid, {fit: 'contain', mirror: 'true'});
} }
async switchDeviceForCamera(id) { async switchDeviceForCamera(id) {
......
...@@ -634,7 +634,7 @@ export class AgoraHandle { ...@@ -634,7 +634,7 @@ export class AgoraHandle {
async archiveMark(fileData, type = 'video') { async archiveMark(fileData, type = 'video') {
this.AnyRemote.sendWSFromCall( this.AnyRemote.sendWSFromCall(
'-2', '-2',
type === 'video' ? 'ArchiveImage' : "StoreScreenShareMark", 'ChatImage',
{ {
msgId: generateMessageId(), msgId: generateMessageId(),
tip: { tip: {
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<i class="iconfont icon-color" :style="{color: styledColor}"></i> <i class="iconfont icon-color" :style="{color: styledColor}"></i>
</template> </template>
<div class="color-block-container"> <div class="color-block-container">
<div v-for="(item, index) in colorBlock" :key="index" class="color-block" <div v-for="(bg, index) in colorBlock" :key="index" class="color-block"
:style="{backgroundColor: item}" @click="confirmColorPick(index)"></div> :style="{backgroundColor: bg}" @click="confirmColorPick(index)"></div>
</div> </div>
</n-popover> </n-popover>
</template> </template>
......
...@@ -402,7 +402,7 @@ nextTick(function() { ...@@ -402,7 +402,7 @@ nextTick(function() {
i.iconfont.activated { i.iconfont.activated {
color: #00AFF0; color: #00AFF0;
} }
.operation-branch i.iconfont::before { .operation-branch i.iconfont:not(.icon-color)::before {
color: #ffffff !important; color: #ffffff !important;
} }
</style> </style>
......
<template> <template>
<div :id="ps.isSelf ? 'LocalVideo' : `RemoteVideo${ps.id}`" class="relative h-full"> <div :id="ps.isSelf ? 'LocalVideo' : `RemoteVideo${ps.id}`" class="relative h-full video-cont">
<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" v-if="userDataForThis.userCallGroup == 1"> <div class="text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary" v-if="userDataForThis.userCallGroup == 1">
{{ userDataForThis.name }} {{ userDataForThis.name }}
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<global-icon :size="12" icon="writing"></global-icon> <global-icon :size="12" icon="writing"></global-icon>
</div> </div>
<div class="rounded-full size-6 flex-center cursor-pointer" style="background-color: var(--color-border-1)"> <div class="rounded-full size-6 flex-center cursor-pointer" style="background-color: var(--color-border-1)">
<global-icon :size="12" color="rgb(var(--success-6))" icon="mic"></global-icon> <global-icon v-if="!isThisUserMuted" :size="12" color="rgb(var(--success-6))" :icon="'mic'"></global-icon>
<global-icon :size="12" v-else :icon="'mic-off'"></global-icon>
</div> </div>
</a-space> </a-space>
</div> </div>
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { isUserHost } from 'AnyR/states/chatChannelStates' import { chatChannelState, isUserHost } from 'AnyR/states/chatChannelStates'
import { userStates } from 'AnyR/states/wsStates' import { userStates } from 'AnyR/states/wsStates'
import { computed, onMounted, onUpdated } from 'vue' import { computed, onMounted, onUpdated } from 'vue'
import { useAnyR } from 'AnyR/index' import { useAnyR } from 'AnyR/index'
...@@ -42,6 +43,10 @@ const ps = defineProps({ ...@@ -42,6 +43,10 @@ const ps = defineProps({
id: String id: String
}) })
const isThisUserMuted = computed(function() {
return chatChannelState.value.mutedUserIdSet.includes(ps.id) || chatChannelState.value.mutedUserIdSet.includes(userStates.value.currentUserId)
})
const userDataForThis = computed(function () { const userDataForThis = computed(function () {
if (ps.isSelf) { if (ps.isSelf) {
return { return {
...@@ -76,4 +81,8 @@ onUpdated(function () { ...@@ -76,4 +81,8 @@ onUpdated(function () {
} }
}) })
</script> </script>
<style lang="less" scoped></style> <style lang="less" scoped>
:deep(.video-cont video) {
transform: none !important;
}
</style>
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
{{ userDataForThis.name }} {{ userDataForThis.name }}
</div> </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)">
<global-icon :size="12" color="rgb(var(--success-6))" icon="mic"></global-icon> <global-icon v-if="!isCenterUserMuted" :size="12" color="rgb(var(--success-6))" :icon="'mic'"></global-icon>
<global-icon v-else :size="12" :icon="'mic-off'"></global-icon>
</div> </div>
</div> </div>
<!-- <div class="absolute top-0 left-0 right-0 bottom-0 flex-center flex-col"> <!-- <div class="absolute top-0 left-0 right-0 bottom-0 flex-center flex-col">
...@@ -101,6 +102,10 @@ const ps = defineProps<{ ...@@ -101,6 +102,10 @@ const ps = defineProps<{
id: any id: any
}>() }>()
const isCenterUserMuted = computed(function() {
return chatChannelState.value.mutedUserIdSet.includes(ps.id)
})
const firstVideoToBeAttached = ref('[data-self="remote-main"] video') const firstVideoToBeAttached = ref('[data-self="remote-main"] video')
const recordListener = function (records: any) { const recordListener = function (records: any) {
AnyR?.agora.continueMark(records) AnyR?.agora.continueMark(records)
...@@ -290,4 +295,7 @@ function hangupCall() { ...@@ -290,4 +295,7 @@ function hangupCall() {
opacity: 1; opacity: 1;
} }
} }
:deep([data-self='remote-main'] video) {
transform: none !important;
}
</style> </style>
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