Commit 0dd5db1c by qlintonger xeno

通话数据问题准备修复+4

parent 926019df
<template> <template>
<div> <div>
<div :id="`RemoteVideo${ps.id}`" class="relative mb-4 flex-auto" @mousedown.capture="handleBlinkingStart"> <div :id="`RemoteVideo${ps.id}`" class="relative mb-4 flex-auto" @mousedown.capture="handleBlinkingStart">
<div class="red-ball" v-for="q in chatChannelState.blinkSpotSet" :key="q.id" @animationend="q => centerEnded(q)"></div> <div class="red-ball absolute z-[999]"
:style="{
top: `${q.yPos * 100}%`,
left: `${q.xPos * 100}%`
}"
v-for="q in chatChannelState.blinkSpotSet" :key="q.id" :data-id="`${q.id}`" @animationend="centerEnded"></div>
<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 v-if="userDataForThis.userCallGroup == 1" <div v-if="userDataForThis.userCallGroup == 1"
class="text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary"> class="text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary">
...@@ -80,7 +85,8 @@ const ps = defineProps<{ ...@@ -80,7 +85,8 @@ const ps = defineProps<{
const blinkStart = ref(false) const blinkStart = ref(false)
function centerEnded(q: any) { function centerEnded(q: any) {
chatChannelState.value.blinkSpotSet = chatChannelState.value.blinkSpotSet.filter(a=>a.id !== q.id); const id = q.target.getAttribute('data-id')
chatChannelState.value.blinkSpotSet = chatChannelState.value.blinkSpotSet.filter(a=>a.id !== id);
} }
function handleBlinkingStart($e: PointerEvent) { function handleBlinkingStart($e: PointerEvent) {
...@@ -91,6 +97,9 @@ function handleBlinkingStart($e: PointerEvent) { ...@@ -91,6 +97,9 @@ function handleBlinkingStart($e: PointerEvent) {
const xPos = offsetX / clientWidth; const xPos = offsetX / clientWidth;
const yPos = offsetY / clientHeight; const yPos = offsetY / clientHeight;
const id = userStates.value.currentUserId; const id = userStates.value.currentUserId;
console.log('d passed', {
id, xPos, yPos
})
AnyR?.agora.sendBlinkSpot({ AnyR?.agora.sendBlinkSpot({
id, xPos, yPos id, xPos, yPos
}) })
......
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