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
119f1481
Commit
119f1481
authored
May 16, 2024
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
眼镜端修复+2
parent
e63942da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
anyremote/agoraHandle.js
+30
-12
src/views/remote/videoCall/videoChat.vue
+2
-1
No files found.
anyremote/agoraHandle.js
View file @
119f1481
...
@@ -333,15 +333,24 @@ export class AgoraHandle {
...
@@ -333,15 +333,24 @@ export class AgoraHandle {
case
'Image'
:
case
'Image'
:
case
'File'
:
case
'File'
:
{
{
console
.
log
(
'收到ws眼镜端消息点'
,
msgData
)
console
.
log
(
'收到ws眼镜端消息点'
,
msgData
);
if
(
msgData
.
msgData
.
msgId
)
{
break
}
const
msgType
=
msgData
.
msgData
.
tip
.
endsWith
(
'.mp4'
)
?
'ChatVideo'
:
const
msgType
=
msgData
.
msgData
.
tip
.
endsWith
(
'.mp4'
)
?
'ChatVideo'
:
[
'.jpg'
,
'.png'
,
'.jpeg'
].
some
(
a
=>
msgData
.
msgData
.
tip
.
endsWith
(
a
))
?
'ChatImage'
:
[
'.jpg'
,
'.png'
,
'.jpeg'
].
some
(
a
=>
msgData
.
msgData
.
tip
.
endsWith
(
a
))
?
'ChatImage'
:
'ChatFile'
'ChatFile'
const
msgDataWhich
=
{
const
msgDataWhich
=
{
fileSize
:
0
,
tip
:
{
fileType
:
msgType
===
'ChatVideo'
?
'video'
:
msgType
===
'ChatImage'
?
'image'
:
'file'
,
fileSize
:
0
,
fileUrl
:
msgData
.
msgData
.
tip
,
fileType
:
msgType
===
'ChatVideo'
?
'video'
:
msgType
===
'ChatImage'
?
'image'
:
'file'
,
fileName
:
msgData
.
msgData
.
tip
.
slice
(
msgData
.
msgData
.
tip
.
lastIndexOf
(
'/'
)
+
1
)
fileUrl
:
msgData
.
msgData
.
tip
,
fileName
:
msgData
.
msgData
.
tip
.
slice
(
msgData
.
msgData
.
tip
.
lastIndexOf
(
'/'
)
+
1
)
},
msgId
:
generateMessageId
(),
quoteId
:
''
,
fromName
,
channelID
:
chatChannelState
.
value
.
chatChannelId
}
}
this
.
AnyRemote
.
sendRaw
(
this
.
AnyRemote
.
sendRaw
(
fromID
,
fromName
,
msgType
,
msgDataWhich
,
chatChannelState
.
value
.
chatChannelId
,
'-2'
fromID
,
fromName
,
msgType
,
msgDataWhich
,
chatChannelState
.
value
.
chatChannelId
,
'-2'
...
@@ -421,6 +430,7 @@ export class AgoraHandle {
...
@@ -421,6 +430,7 @@ export class AgoraHandle {
}
}
sendTextInChatRoom
(
text
)
{
sendTextInChatRoom
(
text
)
{
const
msgId
=
generateMessageId
()
this
.
AnyRemote
.
sendWSFromCall
(
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'-2'
,
'ChatTxt'
,
'ChatTxt'
,
...
@@ -429,14 +439,16 @@ export class AgoraHandle {
...
@@ -429,14 +439,16 @@ export class AgoraHandle {
quoteId
:
''
,
quoteId
:
''
,
channelID
:
chatChannelState
.
value
.
chatChannelId
,
channelID
:
chatChannelState
.
value
.
chatChannelId
,
fromName
:
userStates
.
value
.
currentUserName
,
fromName
:
userStates
.
value
.
currentUserName
,
msgId
:
generateMessageId
()
msgId
}
}
)
)
this
.
AnyRemote
.
sendWSFromCall
(
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'-2'
,
'Txt'
,
{
{
tip
:
text
,
tip
:
text
,
channelID
:
chatChannelState
.
value
.
chatChannelId
,
channelID
:
chatChannelState
.
value
.
chatChannelId
,
msgId
}
}
)
)
}
}
...
@@ -444,10 +456,11 @@ export class AgoraHandle {
...
@@ -444,10 +456,11 @@ export class AgoraHandle {
sendImage
(
data
)
{
sendImage
(
data
)
{
const
channelID
=
chatChannelState
.
value
.
chatChannelId
;
const
channelID
=
chatChannelState
.
value
.
chatChannelId
;
const
fromName
=
userStates
.
value
.
currentUserName
const
fromName
=
userStates
.
value
.
currentUserName
const
msgId
=
generateMessageId
()
this
.
AnyRemote
.
sendWSFromCall
(
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'-2'
,
'ChatImage'
,
{
'ChatImage'
,
{
msgId
:
generateMessageId
()
,
msgId
,
quoteId
:
""
,
quoteId
:
""
,
channelID
,
channelID
,
fromName
,
fromName
,
...
@@ -464,7 +477,8 @@ export class AgoraHandle {
...
@@ -464,7 +477,8 @@ export class AgoraHandle {
'Image'
,
'Image'
,
{
{
tip
:
data
.
fileUrl
,
tip
:
data
.
fileUrl
,
channelID
channelID
,
msgId
}
}
)
)
}
}
...
@@ -472,10 +486,11 @@ export class AgoraHandle {
...
@@ -472,10 +486,11 @@ export class AgoraHandle {
sendFile
(
data
)
{
sendFile
(
data
)
{
const
channelID
=
chatChannelState
.
value
.
chatChannelId
;
const
channelID
=
chatChannelState
.
value
.
chatChannelId
;
const
fromName
=
userStates
.
value
.
currentUserName
const
fromName
=
userStates
.
value
.
currentUserName
const
msgId
=
generateMessageId
()
this
.
AnyRemote
.
sendWSFromCall
(
this
.
AnyRemote
.
sendWSFromCall
(
'-2'
,
'-2'
,
'ChatFile'
,
{
'ChatFile'
,
{
msgId
:
generateMessageId
()
,
msgId
,
quoteId
:
""
,
quoteId
:
""
,
channelID
,
channelID
,
fromName
,
fromName
,
...
@@ -492,7 +507,8 @@ export class AgoraHandle {
...
@@ -492,7 +507,8 @@ export class AgoraHandle {
'File'
,
'File'
,
{
{
tip
:
data
.
fileUrl
,
tip
:
data
.
fileUrl
,
channelID
channelID
,
msgId
}
}
)
)
}
}
...
@@ -500,8 +516,9 @@ export class AgoraHandle {
...
@@ -500,8 +516,9 @@ export class AgoraHandle {
sendVideo
(
data
,
fileType
=
'video'
)
{
sendVideo
(
data
,
fileType
=
'video'
)
{
const
channelID
=
chatChannelState
.
value
.
chatChannelId
;
const
channelID
=
chatChannelState
.
value
.
chatChannelId
;
const
fromName
=
userStates
.
value
.
currentUserName
const
fromName
=
userStates
.
value
.
currentUserName
const
msgId
=
generateMessageId
()
const
md
=
{
const
md
=
{
msgId
:
generateMessageId
()
,
msgId
,
quoteId
:
""
,
quoteId
:
""
,
channelID
,
channelID
,
fromName
,
fromName
,
...
@@ -521,7 +538,8 @@ export class AgoraHandle {
...
@@ -521,7 +538,8 @@ export class AgoraHandle {
'File'
,
'File'
,
{
{
tip
:
data
.
fileUrl
,
tip
:
data
.
fileUrl
,
channelID
channelID
,
msgId
}
}
)
)
}
}
...
...
src/views/remote/videoCall/videoChat.vue
View file @
119f1481
...
@@ -106,7 +106,7 @@ const uploadMuFile = (option: any, type: string) => {
...
@@ -106,7 +106,7 @@ const uploadMuFile = (option: any, type: string) => {
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
console
.
log
(
'发送内容'
,
res
)
console
.
log
(
'发送内容'
,
res
)
const
dataFormed
=
{
const
dataFormed
=
{
fileUrl
:
res
.
data
.
url
,
fileUrl
:
res
.
data
.
oURL
,
fileName
:
res
.
data
.
name
,
fileName
:
res
.
data
.
name
,
fileSize
:
Number
.
parseInt
(
res
.
data
.
size
),
fileSize
:
Number
.
parseInt
(
res
.
data
.
size
),
fileType
:
type
fileType
:
type
...
@@ -136,6 +136,7 @@ function convertURL(string: string) {
...
@@ -136,6 +136,7 @@ function convertURL(string: string) {
}
}
const
mapChatMessageQueue
=
computed
(
function
()
{
const
mapChatMessageQueue
=
computed
(
function
()
{
console
.
log
(
'mq here'
,
chatChannelState
.
value
.
messageQueue
)
return
chatChannelState
.
value
.
messageQueue
.
map
(
function
(
a
:
any
)
{
return
chatChannelState
.
value
.
messageQueue
.
map
(
function
(
a
:
any
)
{
return
{
return
{
isSelf
:
a
.
uid
===
userStates
.
value
.
currentUserId
,
isSelf
:
a
.
uid
===
userStates
.
value
.
currentUserId
,
...
...
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