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
c0274793
Commit
c0274793
authored
May 07, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 122.112.146.86:qlintonger/standalone-anyremote
parents
e411a69f
926019df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
27 deletions
+71
-27
src/views/remote/videoCall/videoTools.vue
+71
-27
No files found.
src/views/remote/videoCall/videoTools.vue
View file @
c0274793
<
template
>
<
template
>
<div>
<div>
<div
class=
"relative mb-4 flex-auto"
:id=
"`RemoteVideo$
{ps.id}`">
<div
:id=
"`RemoteVideo$
{ps.id}`" class="relative mb-4 flex-auto" @mousedown.capture="handleBlinkingStart">
<div
class=
"red-ball"
v-for=
"q in chatChannelState.blinkSpotSet"
:key=
"q.id"
@
animationend=
"q => centerEnded(q)"
></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
class=
"text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary"
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"
>
{{
userDataForThis
.
name
}}
</div>
<div
v-else
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=
"text-xs px-2 rounded-sm leading-5"
style=
"background-color: rgb(var(--success-1)); color: rgb(var(--success-6))"
v-else
>
{{
userDataForThis
.
name
}}
</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)"
>
<global-icon
icon=
"mic"
:size=
"12"
color=
"rgb(var(--success-6))
"
></global-icon>
<global-icon
:size=
"12"
color=
"rgb(var(--success-6))"
icon=
"mic
"
></global-icon>
</div>
</div>
</div>
</div>
<!--
<div
class=
"absolute top-0 left-0 right-0 bottom-0 flex-center flex-col"
>
<!--
<div
class=
"absolute top-0 left-0 right-0 bottom-0 flex-center flex-col"
>
...
@@ -19,19 +24,19 @@
...
@@ -19,19 +24,19 @@
</div>
</div>
<div
class=
"flex justify-center w-full"
>
<div
class=
"flex justify-center w-full"
>
<div
v-if=
"!isUserHost"
class=
"w-[120px] h-[72px] item"
@
click=
"hangupCall"
>
<div
v-if=
"!isUserHost"
class=
"w-[120px] h-[72px] item"
@
click=
"hangupCall"
>
<global-icon
icon=
"phone-hangup"
:size=
"21"
color=
"rgb(var(--danger-5))
"
></global-icon>
<global-icon
:size=
"21"
color=
"rgb(var(--danger-5))"
icon=
"phone-hangup
"
></global-icon>
<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
v-else
class=
"w-[120px] h-[72px] item"
@
click=
"endMeeting"
>
<div
v-else
class=
"w-[120px] h-[72px] item"
@
click=
"endMeeting"
>
<global-icon
icon=
"phone-hangup"
:size=
"21"
color=
"rgb(var(--danger-5))
"
></global-icon>
<global-icon
:size=
"21"
color=
"rgb(var(--danger-5))"
icon=
"phone-hangup
"
></global-icon>
<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
icon=
"mic"
:size=
"21
"
></global-icon>
<global-icon
:size=
"21"
icon=
"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"
>
<global-icon
icon=
"swap"
:size=
"21
"
></global-icon>
<global-icon
:size=
"21"
icon=
"swap
"
></global-icon>
<span
class=
"mt-1 color-text-2"
>
{{
isVoiceChatOnly
?
'视频模式'
:
'语音模式'
}}
</span>
<span
class=
"mt-1 color-text-2"
>
{{
isVoiceChatOnly
?
'视频模式'
:
'语音模式'
}}
</span>
</div>
</div>
<!--
<div
class=
"w-[120px] h-[72px] item"
>
<!--
<div
class=
"w-[120px] h-[72px] item"
>
...
@@ -39,41 +44,59 @@
...
@@ -39,41 +44,59 @@
<span
class=
"mt-1 color-text-2"
>
截图
</span>
<span
class=
"mt-1 color-text-2"
>
截图
</span>
</div>
-->
</div>
-->
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleScreenShare"
>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"toggleScreenShare"
>
<global-icon
icon=
"shared-screen"
:size=
"21
"
></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"
>
<global-icon
icon=
"record"
:size=
"21
"
></global-icon>
<global-icon
:size=
"21"
icon=
"record
"
></global-icon>
<span
class=
"mt-1 color-text-2"
>
开始录制
</span>
<span
class=
"mt-1 color-text-2"
>
开始录制
</span>
</div>
</div>
<div
class=
"w-[120px] h-[72px] item"
v-if=
"isUserHost
"
@
click=
"allMute"
>
<div
v-if=
"isUserHost"
class=
"w-[120px] h-[72px] item
"
@
click=
"allMute"
>
<global-icon
icon=
"mic-off"
:size=
"21
"
></global-icon>
<global-icon
:size=
"21"
icon=
"mic-off
"
></global-icon>
<span
class=
"mt-1 color-text-2"
>
全体静音
</span>
<span
class=
"mt-1 color-text-2"
>
全体静音
</span>
</div>
</div>
<div
class=
"w-[120px] h-[72px] item"
>
<div
class=
"w-[120px] h-[72px] item"
@
click=
"blinkStart = !blinkStart"
>
<global-icon
icon=
"focus"
:size=
"21
"
></global-icon>
<global-icon
:size=
"21"
icon=
"focus
"
></global-icon>
<span
class=
"mt-1 color-text-2"
>
动态标注
</span>
<span
class=
"mt-1 color-text-2"
>
{{
!
blinkStart
?
'动态标注'
:
'取消动态标注'
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
lang=
"ts"
setup
>
import
{
useAnyR
}
from
'AnyR/index'
import
{
useAnyR
}
from
'AnyR/index'
import
{
isUserHost
}
from
'AnyR/states/chatChannelStates'
import
{
isCurrentUserMuted
,
isUserHost
,
screenShareMetaData
}
from
'AnyR/states/chatChannelStates'
import
{
ref
}
from
'vue'
import
{
onMounted
,
onUpdated
,
ref
}
from
'vue'
import
{
isCurrentUserMuted
}
from
'AnyR/states/chatChannelStates'
import
{
screenShareMetaData
}
from
'AnyR/states/chatChannelStates'
import
{
onMounted
,
onUpdated
}
from
'vue'
import
{
userStates
}
from
'AnyR/states/wsStates'
import
{
userStates
}
from
'AnyR/states/wsStates'
import
{
chatChannelState
}
from
'AnyR/states/chatChannelStates'
const
ps
=
defineProps
<
{
const
ps
=
defineProps
<
{
id
:
any
id
:
any
}
>
()
}
>
()
const
userDataForThis
=
computed
(
function
()
{
const
blinkStart
=
ref
(
false
)
function
centerEnded
(
q
:
any
)
{
chatChannelState
.
value
.
blinkSpotSet
=
chatChannelState
.
value
.
blinkSpotSet
.
filter
(
a
=>
a
.
id
!==
q
.
id
);
}
function
handleBlinkingStart
(
$e
:
PointerEvent
)
{
if
(
!
blinkStart
.
value
)
return
;
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
id
=
userStates
.
value
.
currentUserId
;
AnyR
?.
agora
.
sendBlinkSpot
({
id
,
xPos
,
yPos
})
}
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
||
'--'
,
...
@@ -81,11 +104,11 @@ const userDataForThis = computed(function () {
...
@@ -81,11 +104,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
)
})
})
...
@@ -103,7 +126,8 @@ function toggleScreenShare() {
...
@@ -103,7 +126,8 @@ 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
()
{
...
@@ -125,9 +149,29 @@ function hangupCall() {
...
@@ -125,9 +149,29 @@ 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
);
}
}
}
}
.red-ball
{
width
:
20px
;
height
:
20px
;
border-radius
:
50%
;
background-color
:
red
;
animation
:
blink
1s
ease-in-out
3
;
}
@keyframes
blink
{
0
%
{
opacity
:
1
;
}
50
%
{
opacity
:
0
;
}
100
%
{
opacity
:
1
;
}
}
</
style
>
</
style
>
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