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
d923cd0d
Commit
d923cd0d
authored
May 06, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 视图通话专家
parent
14bce307
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
+29
-12
src/views/remote/videoCall/videoItem.vue
+16
-11
src/views/remote/videoCall/videoTools.vue
+13
-1
No files found.
src/views/remote/videoCall/videoItem.vue
View file @
d923cd0d
<
template
>
<div
:id=
"ps.isSelf ? 'LocalVideo' : `RemoteVideo$
{ps.id}`" class="relative h-full">
<div
class=
"absolute flex justify-between items-center p-1 top-0 left-0 w-full z-10"
>
<div
class=
"text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary"
>
<div
class=
"text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary"
v-if=
"userDataForThis.userCallGroup == 0"
>
{{
userDataForThis
.
name
}}
</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>
<a-space
:size=
"4"
>
...
...
@@ -29,10 +32,10 @@
</
template
>
<
script
lang=
"ts"
setup
>
import
{
isUserHost
}
from
"AnyR/states/chatChannelStates"
;
import
{
userStates
}
from
"AnyR/states/wsStates"
;
import
{
computed
,
onMounted
,
onUpdated
}
from
"vue"
;
import
{
useAnyR
}
from
"AnyR/index"
;
import
{
isUserHost
}
from
'AnyR/states/chatChannelStates'
import
{
userStates
}
from
'AnyR/states/wsStates'
import
{
computed
,
onMounted
,
onUpdated
}
from
'vue'
import
{
useAnyR
}
from
'AnyR/index'
const
ps
=
defineProps
({
isSelf
:
Boolean
,
...
...
@@ -40,23 +43,25 @@ const ps = defineProps({
})
const
userDataForThis
=
computed
(
function
()
{
if
(
ps
.
isSelf
)
{
if
(
ps
.
isSelf
)
{
return
{
name
:
"我"
,
calling
:
false
name
:
'我'
,
calling
:
false
}
}
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
{
name
:
userNow
?.
fromName
||
'--'
,
calling
:
userNow
?.
callState
!==
'calling'
calling
:
userNow
?.
callState
!==
'calling'
,
userCallGroup
:
userNow
?.
userCallGroup
}
})
const
AnyR
=
useAnyR
()
;
const
AnyR
=
useAnyR
()
function
cancelCallExact
()
{
AnyR
?.
agora
.
cancelExactCall
(
ps
.
id
);
AnyR
?.
agora
.
cancelExactCall
(
ps
.
id
)
}
onMounted
(
function
()
{
...
...
src/views/remote/videoCall/videoTools.vue
View file @
d923cd0d
...
...
@@ -2,7 +2,10 @@
<div>
<div
class=
"relative mb-4 flex-auto"
:id=
"`RemoteVideo$
{ps.id}`">
<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"
style=
"background-color: rgb(var(--success-1)); color: rgb(var(--success-6))"
>
吴彦谦
</div>
<div
class=
"text-xs px-2 rounded-sm leading-5 bg-primary-disable text-primary"
v-if=
"userDataForThis.userCallGroup == 0"
>
{{
userDataForThis
.
name
}}
</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)"
>
<global-icon
icon=
"mic"
:size=
"12"
color=
"rgb(var(--success-6))"
></global-icon>
</div>
...
...
@@ -60,11 +63,20 @@ import { 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'
const
ps
=
defineProps
<
{
id
:
any
}
>
()
const
userDataForThis
=
computed
(
function
()
{
const
userNow
:
any
=
userStates
.
value
.
onlineContacts
.
find
((
a
:
any
)
=>
a
.
fromID
===
ps
.
id
)
return
{
name
:
userNow
?.
fromName
||
'--'
,
userCallGroup
:
userNow
?.
userCallGroup
}
})
onMounted
(
function
()
{
AnyR
?.
agora
.
forceReplay
(
ps
.
id
)
})
...
...
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