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
87d28029
Commit
87d28029
authored
May 09, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化调整
parent
b951dda7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
56 deletions
+66
-56
src/views/remote/contacts/eventList.vue
+1
-1
src/views/remote/videoCall/videoTools.vue
+65
-55
No files found.
src/views/remote/contacts/eventList.vue
View file @
87d28029
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<
template
#
initiator=
"{ record }"
>
<
template
#
initiator=
"{ record }"
>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<global-avatar
:size=
"32"
:icon-size=
"12"
></global-avatar>
<global-avatar
:size=
"32"
:icon-size=
"12"
></global-avatar>
<a-tooltip
:content=
"get
ParticipantsName(record.userList
)"
>
<a-tooltip
:content=
"get
InitiatorName(record
)"
>
<span
class=
"ml-2 truncate max-w-20"
>
{{
getInitiatorName
(
record
)
}}
</span>
<span
class=
"ml-2 truncate max-w-20"
>
{{
getInitiatorName
(
record
)
}}
</span>
</a-tooltip>
</a-tooltip>
</div>
</div>
...
...
src/views/remote/videoCall/videoTools.vue
View file @
87d28029
<
template
>
<
template
>
<div>
<div>
<div
:id=
"`RemoteVideo$
{ps.id}`" class="relative mb-4 flex-auto"
<div
:id=
"`RemoteVideo$
{ps.id}`" class="relative mb-4 flex-auto" data-self="remote-main" @mousedown.capture="handleBlinkingStart">
data-self="remote-main" @mousedown.capture="handleBlinkingStart">
<n-message-provider>
<n-message-provider>
<image-editor
<image-editor
:before-cancel=
"beforeEndMarkHandle"
:before-cancel=
"beforeEndMarkHandle"
...
@@ -16,21 +15,22 @@
...
@@ -16,21 +15,22 @@
@
canvas-saved=
"paintSaved"
@
canvas-saved=
"paintSaved"
/>
/>
</n-message-provider>
</n-message-provider>
<div
v-for=
"q in chatChannelState.blinkSpotSet"
<div
:key=
"q.id"
v-for=
"q in chatChannelState.blinkSpotSet"
:data-id=
"`$
{q.id}`" :style="{
:key=
"q.id"
:data-id=
"`$
{q.id}`"
:style="{
top: `${q.yPos * 100}%`,
top: `${q.yPos * 100}%`,
left: `${q.xPos * 100}%`
left: `${q.xPos * 100}%`
}" class="red-ball absolute z-[999]"
}"
@animationend="centerEnded">
</div>
class="red-ball absolute z-[999]"
@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"
>
{{
userDataForThis
.
name
}}
{{
userDataForThis
.
name
}}
</div>
</div>
<div
v-else
<div
v-else
class=
"text-xs px-2 rounded-sm leading-5"
style=
"background-color: rgb(var(--success-1)); color: rgb(var(--success-6))"
>
class=
"text-xs px-2 rounded-sm leading-5"
style=
"background-color: rgb(var(--success-1)); color: rgb(var(--success-6))"
>
{{
userDataForThis
.
name
}}
{{
userDataForThis
.
name
}}
</div>
</div>
<div
class=
"rounded-full size-6 flex-center"
style=
"background-color: var(--color-border-1)"
>
<div
class=
"rounded-full size-6 flex-center"
style=
"background-color: var(--color-border-1)"
>
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<span
class=
"mt-1"
style=
"color: rgb(var(--danger-5))"
>
结束会议
</span>
<span
class=
"mt-1"
style=
"color: rgb(var(--danger-5))"
>
结束会议
</span>
</div>
</div>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleMute"
>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleMute"
>
<global-icon
:size=
"21"
icon=
"mic
"
></global-icon>
<global-icon
:size=
"21"
:icon=
"isCurrentUserMuted ? 'mic-off' : 'mic'
"
></global-icon>
<span
class=
"mt-1 color-text-2"
>
{{
isCurrentUserMuted
?
'取消静音'
:
'静音'
}}
</span>
<span
class=
"mt-1 color-text-2"
>
{{
isCurrentUserMuted
?
'取消静音'
:
'静音'
}}
</span>
</div>
</div>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleVoiceChatOnly"
>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleVoiceChatOnly"
>
...
@@ -68,8 +68,7 @@
...
@@ -68,8 +68,7 @@
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleScreenShare"
>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleScreenShare"
>
<global-icon
:size=
"21"
icon=
"shared-screen"
></global-icon>
<global-icon
:size=
"21"
icon=
"shared-screen"
></global-icon>
<span
class=
"mt-1 color-text-2"
>
<span
class=
"mt-1 color-text-2"
>
{{
screenShareMetaData
.
byOther
?
'他人正在共享'
:
screenShareMetaData
.
byCurrentUser
?
'取消屏幕共享'
:
'屏幕共享'
{{
screenShareMetaData
.
byOther
?
'他人正在共享'
:
screenShareMetaData
.
byCurrentUser
?
'取消屏幕共享'
:
'屏幕共享'
}}
}}
</span>
</span>
</div>
</div>
<div
class=
"w-[120px] h-[72px] item"
>
<div
class=
"w-[120px] h-[72px] item"
>
...
@@ -90,16 +89,8 @@
...
@@ -90,16 +89,8 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useAnyR
}
from
'AnyR/index'
import
{
useAnyR
}
from
'AnyR/index'
import
{
NMessageProvider
}
from
'naive-ui'
import
{
NMessageProvider
}
from
'naive-ui'
import
{
import
{
allOtherChattersIdSet
,
chatChannelState
,
isCurrentUserMuted
,
isScreenShotByCurrentUser
,
isUserHost
,
screenShareMetaData
,
screenshotRecord
}
from
'AnyR/states/chatChannelStates'
allOtherChattersIdSet
,
chatChannelState
,
isCurrentUserMuted
,
isScreenShotByCurrentUser
,
isUserHost
,
screenShareMetaData
,
screenshotRecord
}
from
'AnyR/states/chatChannelStates'
import
{
h
,
onMounted
,
onUpdated
,
ref
}
from
'vue'
import
{
h
,
onMounted
,
onUpdated
,
ref
}
from
'vue'
import
{
userStates
}
from
'AnyR/states/wsStates'
import
{
userStates
}
from
'AnyR/states/wsStates'
import
ImageEditor
from
'AnyR/widgets/ImageEditor/imageEditor.vue'
import
ImageEditor
from
'AnyR/widgets/ImageEditor/imageEditor.vue'
...
@@ -110,8 +101,8 @@ const ps = defineProps<{
...
@@ -110,8 +101,8 @@ const ps = defineProps<{
id
:
any
id
:
any
}
>
()
}
>
()
const
firstVideoToBeAttached
=
ref
(
'[data-self="remote-main"] video'
)
;
const
firstVideoToBeAttached
=
ref
(
'[data-self="remote-main"] video'
)
const
recordListener
=
function
(
records
:
any
)
{
const
recordListener
=
function
(
records
:
any
)
{
AnyR
?.
agora
.
continueMark
(
records
)
AnyR
?.
agora
.
continueMark
(
records
)
}
}
...
@@ -123,20 +114,20 @@ function reallyEndMarkHandle() {
...
@@ -123,20 +114,20 @@ function reallyEndMarkHandle() {
function
initialPaintDone
(
blob
:
Blob
)
{
function
initialPaintDone
(
blob
:
Blob
)
{
if
(
!
chatChannelState
.
value
.
screenshotInitiatorId
&&
chatChannelState
.
value
.
displayImageEditor
)
{
if
(
!
chatChannelState
.
value
.
screenshotInitiatorId
&&
chatChannelState
.
value
.
displayImageEditor
)
{
const
file
=
new
File
([
blob
],
"temp.png"
);
const
file
=
new
File
([
blob
],
'temp.png'
)
const
params
=
{
const
params
=
{
apiPwd
:
'Ifar$2_0160_525_Mocp'
,
apiPwd
:
'Ifar$2_0160_525_Mocp'
,
file
,
file
,
requestFrom
:
6
,
requestFrom
:
6
,
uid
:
4
uid
:
4
}
;
}
alova
alova
// @ts-ignore
// @ts-ignore
.
Post
<
any
>
(
'/admin/uploadMuFile'
,
params
,
{
meta
:
{
isUpload
:
true
}
})
.
Post
<
any
>
(
'/admin/uploadMuFile'
,
params
,
{
meta
:
{
isUpload
:
true
}
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
AnyR
?.
agora
.
startMark
(
res
.
data
.
url
);
AnyR
?.
agora
.
startMark
(
res
.
data
.
url
)
}
}
})
})
}
}
}
}
...
@@ -147,21 +138,37 @@ function paintSaved(blob: any) {
...
@@ -147,21 +138,37 @@ function paintSaved(blob: any) {
async
function
beforeEndMarkHandle
()
{
async
function
beforeEndMarkHandle
()
{
if
(
isScreenShotByCurrentUser
.
value
)
{
if
(
isScreenShotByCurrentUser
.
value
)
{
return
new
Promise
(
function
(
resolve
)
{
return
new
Promise
(
function
(
resolve
)
{
Modal
.
warning
({
Modal
.
warning
({
title
:
'你是截图发起者,退出后将会要求其他用户一同退出,确认?'
,
title
:
'你是截图发起者,退出后将会要求其他用户一同退出,确认?'
,
content
:
()
=>
h
(
'div'
,
{
content
:
()
=>
class
:
'flex w-full items-center justify-center'
h
(
},
[
'div'
,
h
(
Button
,
{
{
size
:
'small'
,
type
:
'primary'
,
status
:
'warning'
,
class
:
'flex w-full items-center justify-center'
onClick
:
()
=>
resolve
(
true
)
},
},
'确定'
),
[
h
(
Button
,
{
h
(
size
:
'small'
,
type
:
'primary'
,
Button
,
onClick
:
()
=>
resolve
(
false
)
{
},
'取消'
)
size
:
'small'
,
])
type
:
'primary'
,
status
:
'warning'
,
onClick
:
()
=>
resolve
(
true
)
},
'确定'
),
h
(
Button
,
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
resolve
(
false
)
},
'取消'
)
]
)
})
})
})
})
}
}
...
@@ -181,26 +188,30 @@ const blinkStart = ref(false)
...
@@ -181,26 +188,30 @@ const blinkStart = ref(false)
function
centerEnded
(
q
:
any
)
{
function
centerEnded
(
q
:
any
)
{
const
id
=
q
.
target
.
getAttribute
(
'data-id'
)
const
id
=
q
.
target
.
getAttribute
(
'data-id'
)
chatChannelState
.
value
.
blinkSpotSet
=
chatChannelState
.
value
.
blinkSpotSet
.
filter
(
a
=>
a
.
id
!==
id
)
chatChannelState
.
value
.
blinkSpotSet
=
chatChannelState
.
value
.
blinkSpotSet
.
filter
(
(
a
)
=>
a
.
id
!==
id
)
}
}
function
handleBlinkingStart
(
$e
:
PointerEvent
)
{
function
handleBlinkingStart
(
$e
:
PointerEvent
)
{
if
(
!
blinkStart
.
value
)
return
if
(
!
blinkStart
.
value
)
return
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
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'
,
{
console
.
log
(
'd passed'
,
{
id
,
xPos
,
yPos
id
,
xPos
,
yPos
})
})
AnyR
?.
agora
.
sendBlinkSpot
({
AnyR
?.
agora
.
sendBlinkSpot
({
id
,
xPos
,
yPos
id
,
xPos
,
yPos
})
})
}
}
const
userDataForThis
=
computed
(
function
()
{
const
userDataForThis
=
computed
(
function
()
{
const
userNow
:
any
=
userStates
.
value
.
onlineContacts
.
find
((
a
:
any
)
=>
a
.
fromID
===
ps
.
id
)
const
userNow
:
any
=
userStates
.
value
.
onlineContacts
.
find
((
a
:
any
)
=>
a
.
fromID
===
ps
.
id
)
return
{
return
{
name
:
userNow
?.
fromName
||
'--'
,
name
:
userNow
?.
fromName
||
'--'
,
...
@@ -208,11 +219,11 @@ const userDataForThis = computed(function() {
...
@@ -208,11 +219,11 @@ const userDataForThis = computed(function() {
}
}
})
})
onMounted
(
function
()
{
onMounted
(
function
()
{
AnyR
?.
agora
.
forceReplay
(
ps
.
id
)
AnyR
?.
agora
.
forceReplay
(
ps
.
id
)
})
})
onUpdated
(
function
()
{
onUpdated
(
function
()
{
AnyR
?.
agora
.
forceReplay
(
ps
.
id
)
AnyR
?.
agora
.
forceReplay
(
ps
.
id
)
})
})
...
@@ -230,8 +241,7 @@ function toggleScreenShare() {
...
@@ -230,8 +241,7 @@ function toggleScreenShare() {
AnyR
?.
agora
.
screenShareHandle
()
AnyR
?.
agora
.
screenShareHandle
()
}
}
AnyR
?.
agora
.
screenShareHandle
()
AnyR
?.
agora
.
screenShareHandle
()
AnyR
?.
agora
.
agoraApp
.
toggleScreenShare
(
!
screenShareMetaData
.
value
.
byCurrentUser
,
endHandle
,
endHandle
,
()
=>
{
AnyR
?.
agora
.
agoraApp
.
toggleScreenShare
(
!
screenShareMetaData
.
value
.
byCurrentUser
,
endHandle
,
endHandle
,
()
=>
{})
})
}
}
function
allMute
()
{
function
allMute
()
{
...
@@ -253,7 +263,7 @@ function hangupCall() {
...
@@ -253,7 +263,7 @@ function hangupCall() {
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.item
{
.item
{
@apply
flex-center
flex-col
rounded
cursor-pointer;
@apply
flex-center
flex-col
rounded
cursor-pointer;
&:hover
{
&:hover
{
background-color
:
var
(
--color-fill-2
);
background-color
:
var
(
--color-fill-2
);
...
...
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