Commit 0612ef0e by qlintonger xeno

眼镜端修复

parent 5aa8066f
......@@ -333,13 +333,19 @@ export class AgoraHandle {
case 'File':
{
console.log('收到ws眼镜端消息点', msgData)
msgData.msgData.tip = {
fileSize: 0,
fileType: 'video',
fileUrl: msgData.msgData.tip,
fileName: msgData.msgData.tip.slice(msgData.msgData.tip.lastIndexOf('/') + 1)
}
addMessageItemInMeeting(msgData)
// msgData.msgData.tip = {
// fileSize: 0,
// fileType: 'video',
// fileUrl: msgData.msgData.tip,
// fileName: msgData.msgData.tip.slice(msgData.msgData.tip.lastIndexOf('/') + 1)
// }
// addMessageItemInMeeting(msgData);
const msgType = msgData.msgData.tip.endsWith('.mp4') ? 'ChatVideo' :
['.jpg', '.png', '.jpeg'].some(a=>msgData.msgData.tip.endsWith(a)) ? 'ChatImage' :
'ChatFile'
this.AnyRemote.sendRaw(
fromID, fromName, msgType
)
break;
}
case 'ChatAudio':
......@@ -426,6 +432,13 @@ export class AgoraHandle {
msgId: generateMessageId()
}
)
this.AnyRemote.sendWSFromCall(
'-2',
{
tip: text,
channelID: chatChannelState.value.chatChannelId,
}
)
}
sendImage(data) {
......@@ -446,6 +459,14 @@ export class AgoraHandle {
}
}
)
this.AnyRemote.sendWSFromCall(
'-2',
'Image',
{
tip: data.fileUrl,
channelID
}
)
}
sendFile(data) {
......@@ -466,6 +487,14 @@ export class AgoraHandle {
}
}
)
this.AnyRemote.sendWSFromCall(
'-2',
'File',
{
tip: data.fileUrl,
channelID
}
)
}
sendVideo(data, fileType = 'video') {
......@@ -487,6 +516,14 @@ export class AgoraHandle {
'-2',
'ChatVideo', md
)
this.AnyRemote.sendWSFromCall(
'-2',
'File',
{
tip: data.fileUrl,
channelID
}
)
}
endMark(cancelType = 'video') {
......@@ -669,7 +706,10 @@ export class AgoraHandle {
this.AnyRemote.sendWSFromCall(
'-2',
'BlinkSpot',
v
{
...v,
channelID: chatChannelState.value.chatChannelId,
}
)
}
}
\ No newline at end of file
......@@ -21,6 +21,17 @@ export class AnyRemote {
this.errorCB = errorCB
}
sendRaw(fromID, fromName, msgType, msgData, channelID, toID) {
this.wsInt.send({
msgData,
toID,
channelID,
msgType,
fromID,
fromName
})
}
sendWSFromCall(toID, msgType, msgData, channelID) {
this.wsInt.send({
fromID: userStates.value.currentUserId,
......
......@@ -20,8 +20,8 @@
:key="q.id"
:data-id="`${q.id}`"
:style="{
top: `${q.yPos * 100}%`,
left: `${q.xPos * 100}%`
top: `${q.y * 100}%`,
left: `${q.x * 100}%`
}"
class="red-ball absolute z-[999]"
@animationend="centerEnded"
......@@ -223,18 +223,13 @@ function handleBlinkingStart($e: PointerEvent) {
if (chatChannelState.value.blinkSpotSet.find((a) => a.id === userStates.value.currentUserId)) return
const { offsetX, offsetY, target } = $e
const { clientWidth, clientHeight } = target as HTMLElement
const xPos = offsetX / clientWidth
const yPos = offsetY / clientHeight
const x = offsetX / clientWidth
const y = offsetY / clientHeight
const id = userStates.value.currentUserId
console.log('d passed', {
id,
xPos,
yPos
})
AnyR?.agora.sendBlinkSpot({
id,
xPos,
yPos
x,
y
})
}
......
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