Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
standalone-anyremote
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qlintonger xeno
standalone-anyremote
Commits
0612ef0e
Commit
0612ef0e
authored
May 16, 2024
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
眼镜端修复
parent
5aa8066f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
19 deletions
+66
-19
anyremote/agoraHandle.js
+49
-8
anyremote/index.js
+11
-0
src/views/remote/videoCall/videoTools.vue
+6
-11
No files found.
anyremote/agoraHandle.js
View file @
0612ef0e
...
@@ -333,13 +333,19 @@ export class AgoraHandle {
...
@@ -333,13 +333,19 @@ export class AgoraHandle {
case
'File'
:
case
'File'
:
{
{
console
.
log
(
'收到ws眼镜端消息点'
,
msgData
)
console
.
log
(
'收到ws眼镜端消息点'
,
msgData
)
msgData
.
msgData
.
tip
=
{
// msgData.msgData.tip = {
fileSize
:
0
,
// fileSize: 0,
fileType
:
'video'
,
// fileType: 'video',
fileUrl
:
msgData
.
msgData
.
tip
,
// fileUrl: msgData.msgData.tip,
fileName
:
msgData
.
msgData
.
tip
.
slice
(
msgData
.
msgData
.
tip
.
lastIndexOf
(
'/'
)
+
1
)
// fileName: msgData.msgData.tip.slice(msgData.msgData.tip.lastIndexOf('/') + 1)
}
// }
addMessageItemInMeeting
(
msgData
)
// 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
;
break
;
}
}
case
'ChatAudio'
:
case
'ChatAudio'
:
...
@@ -426,6 +432,13 @@ export class AgoraHandle {
...
@@ -426,6 +432,13 @@ export class AgoraHandle {
msgId
:
generateMessageId
()
msgId
:
generateMessageId
()
}
}
)
)
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
{
tip
:
text
,
channelID
:
chatChannelState
.
value
.
chatChannelId
,
}
)
}
}
sendImage
(
data
)
{
sendImage
(
data
)
{
...
@@ -446,6 +459,14 @@ export class AgoraHandle {
...
@@ -446,6 +459,14 @@ export class AgoraHandle {
}
}
}
}
)
)
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'Image'
,
{
tip
:
data
.
fileUrl
,
channelID
}
)
}
}
sendFile
(
data
)
{
sendFile
(
data
)
{
...
@@ -466,6 +487,14 @@ export class AgoraHandle {
...
@@ -466,6 +487,14 @@ export class AgoraHandle {
}
}
}
}
)
)
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'File'
,
{
tip
:
data
.
fileUrl
,
channelID
}
)
}
}
sendVideo
(
data
,
fileType
=
'video'
)
{
sendVideo
(
data
,
fileType
=
'video'
)
{
...
@@ -487,6 +516,14 @@ export class AgoraHandle {
...
@@ -487,6 +516,14 @@ export class AgoraHandle {
'-2'
,
'-2'
,
'ChatVideo'
,
md
'ChatVideo'
,
md
)
)
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'File'
,
{
tip
:
data
.
fileUrl
,
channelID
}
)
}
}
endMark
(
cancelType
=
'video'
)
{
endMark
(
cancelType
=
'video'
)
{
...
@@ -669,7 +706,10 @@ export class AgoraHandle {
...
@@ -669,7 +706,10 @@ export class AgoraHandle {
this
.
AnyRemote
.
sendWSFromCall
(
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'-2'
,
'BlinkSpot'
,
'BlinkSpot'
,
v
{
...
v
,
channelID
:
chatChannelState
.
value
.
chatChannelId
,
}
)
)
}
}
}
}
\ No newline at end of file
anyremote/index.js
View file @
0612ef0e
...
@@ -21,6 +21,17 @@ export class AnyRemote {
...
@@ -21,6 +21,17 @@ export class AnyRemote {
this
.
errorCB
=
errorCB
this
.
errorCB
=
errorCB
}
}
sendRaw
(
fromID
,
fromName
,
msgType
,
msgData
,
channelID
,
toID
)
{
this
.
wsInt
.
send
({
msgData
,
toID
,
channelID
,
msgType
,
fromID
,
fromName
})
}
sendWSFromCall
(
toID
,
msgType
,
msgData
,
channelID
)
{
sendWSFromCall
(
toID
,
msgType
,
msgData
,
channelID
)
{
this
.
wsInt
.
send
({
this
.
wsInt
.
send
({
fromID
:
userStates
.
value
.
currentUserId
,
fromID
:
userStates
.
value
.
currentUserId
,
...
...
src/views/remote/videoCall/videoTools.vue
View file @
0612ef0e
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
:key=
"q.id"
:key=
"q.id"
:data-id=
"`$
{q.id}`"
:data-id=
"`$
{q.id}`"
:style="{
:style="{
top: `${q.y
Pos
* 100}%`,
top: `${q.y * 100}%`,
left: `${q.x
Pos
* 100}%`
left: `${q.x * 100}%`
}"
}"
class="red-ball absolute z-[999]"
class="red-ball absolute z-[999]"
@animationend="centerEnded"
@animationend="centerEnded"
...
@@ -223,18 +223,13 @@ function handleBlinkingStart($e: PointerEvent) {
...
@@ -223,18 +223,13 @@ function handleBlinkingStart($e: PointerEvent) {
if
(
chatChannelState
.
value
.
blinkSpotSet
.
find
((
a
)
=>
a
.
id
===
userStates
.
value
.
currentUserId
))
return
if
(
chatChannelState
.
value
.
blinkSpotSet
.
find
((
a
)
=>
a
.
id
===
userStates
.
value
.
currentUserId
))
return
const
{
offsetX
,
offsetY
,
target
}
=
$e
const
{
offsetX
,
offsetY
,
target
}
=
$e
const
{
clientWidth
,
clientHeight
}
=
target
as
HTMLElement
const
{
clientWidth
,
clientHeight
}
=
target
as
HTMLElement
const
x
Pos
=
offsetX
/
clientWidth
const
x
=
offsetX
/
clientWidth
const
y
Pos
=
offsetY
/
clientHeight
const
y
=
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
,
id
,
x
Pos
,
x
,
y
Pos
y
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment