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
e3cbd33e
Commit
e3cbd33e
authored
May 21, 2024
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
眼镜端修复+5
parent
198abd75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
anyremote/index.js
+15
-0
No files found.
anyremote/index.js
View file @
e3cbd33e
...
@@ -9,6 +9,7 @@ export class AnyRemote {
...
@@ -9,6 +9,7 @@ export class AnyRemote {
infoCB
=
null
infoCB
=
null
warningCB
=
null
warningCB
=
null
errorCB
=
null
errorCB
=
null
messageQueue
=
[]
configureWS
(
url
,
tabVisibleCB
=
()
=>
true
,
connectionLostCB
=
()
=>
true
,
wsSocketChannelName
=
''
)
{
configureWS
(
url
,
tabVisibleCB
=
()
=>
true
,
connectionLostCB
=
()
=>
true
,
wsSocketChannelName
=
''
)
{
this
.
wsInt
=
new
WSInt
(
url
,
this
.
onMessageGeneral
.
bind
(
this
),
tabVisibleCB
,
connectionLostCB
,
wsSocketChannelName
)
this
.
wsInt
=
new
WSInt
(
url
,
this
.
onMessageGeneral
.
bind
(
this
),
tabVisibleCB
,
connectionLostCB
,
wsSocketChannelName
)
...
@@ -33,6 +34,20 @@ export class AnyRemote {
...
@@ -33,6 +34,20 @@ export class AnyRemote {
}
}
sendWSFromCall
(
toID
,
msgType
,
msgData
,
channelID
)
{
sendWSFromCall
(
toID
,
msgType
,
msgData
,
channelID
)
{
if
(
!
this
.
wsInt
)
{
this
.
messageQueue
.
push
({
toID
,
msgType
,
msgData
,
channelID
})
return
}
if
(
this
.
messageQueue
.
length
)
{
this
.
messageQueue
.
forEach
((
item
)
=>
{
const
{
toID
,
msgType
,
msgData
,
channelID
}
=
item
;
this
.
wsInt
.
send
({
toID
,
msgType
,
msgData
,
channelID
,
fromID
:
userStates
.
value
.
currentUserId
,
fromName
:
userStates
.
value
.
currentUserName
,
})
})
}
this
.
wsInt
.
send
({
this
.
wsInt
.
send
({
fromID
:
userStates
.
value
.
currentUserId
,
fromID
:
userStates
.
value
.
currentUserId
,
fromName
:
userStates
.
value
.
currentUserName
,
fromName
:
userStates
.
value
.
currentUserName
,
...
...
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