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
158480d2
Commit
158480d2
authored
May 10, 2024
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除内容+1
parent
0bde9e33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
anyremote/agora/index.js
+4
-4
src/views/remote/videoCall/videoItem.vue
+3
-3
No files found.
anyremote/agora/index.js
View file @
158480d2
...
...
@@ -93,7 +93,7 @@ export class Agora {
if
(
canProceed
)
{
console
.
log
(
'创建音视频轨道成功!'
,
this
.
data
.
localTracks
)
if
(
this
.
data
.
localTracks
.
videoTrack
)
{
this
.
data
.
localTracks
.
videoTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
fals
e'
})
this
.
data
.
localTracks
.
videoTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
tru
e'
})
}
console
.
log
(
'开始播放本地媒体'
)
await
this
.
AgoraClient
.
publish
(
Object
.
values
(
this
.
data
.
localTracks
));
...
...
@@ -119,7 +119,7 @@ export class Agora {
if
(
v
)
{
try
{
const
screenAudioTrack
=
await
AgoraRTC
.
createScreenVideoTrack
({},
'disable'
);
screenAudioTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
fals
e'
});
screenAudioTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
tru
e'
});
await
this
.
AgoraClient
.
publish
(
screenAudioTrack
);
webrtcStates
.
value
.
currentUsingCameraName
=
''
;
screenAudioTrack
.
on
(
'track-ended'
,
async
()
=>
{
...
...
@@ -141,7 +141,7 @@ export class Agora {
}
else
{
this
.
data
.
localTracks
.
videoTrack
=
await
AgoraRTC
.
createCameraVideoTrack
();
webrtcStates
.
value
.
currentUsingCameraName
=
this
.
data
.
localTracks
.
videoTrack
.
_deviceName
;
this
.
data
.
localTracks
.
videoTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
fals
e'
})
this
.
data
.
localTracks
.
videoTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
tru
e'
})
await
this
.
AgoraClient
.
publish
(
this
.
data
.
localTracks
.
videoTrack
);
}
}
...
...
@@ -158,7 +158,7 @@ export class Agora {
this
.
data
.
localTracks
.
videoTrack
=
await
AgoraRTC
.
createCameraVideoTrack
();
webrtcStates
.
value
.
currentUsingCameraName
=
this
.
data
.
localTracks
.
videoTrack
.
_deviceName
;
await
this
.
AgoraClient
.
publish
(
this
.
data
.
localTracks
.
videoTrack
);
this
.
data
.
localTracks
.
videoTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
fals
e'
})
this
.
data
.
localTracks
.
videoTrack
.
play
(
this
.
localPlayerId
,
{
fit
:
'contain'
,
mirror
:
'
tru
e'
})
}
}
...
...
src/views/remote/videoCall/videoItem.vue
View file @
158480d2
<
template
>
<div
:id=
"ps.isSelf ? 'LocalVideo' : `RemoteVideo$
{ps.id}`" class="relative h-full video-cont bg-fill-bg1" ref="remoteVideoRef">
<div
:id=
"ps.isSelf ? 'LocalVideo' : `RemoteVideo$
{ps.id}`"
data-self="vc"
class="relative h-full video-cont bg-fill-bg1" ref="remoteVideoRef">
<template
v-if=
"isVideoVisible"
>
<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"
v-if=
"userDataForThis.userCallGroup == 1"
>
...
...
@@ -80,7 +80,7 @@ const remoteVideoRef = ref()
const
isVideoVisible
=
ref
(
false
)
const
checkVideoExists
=
()
=>
{
const
video
=
remoteVideoRef
.
value
.
querySelector
(
'video'
)
isVideoVisible
.
value
=
video
?
true
:
false
isVideoVisible
.
value
=
!!
video
}
const
observer
=
new
MutationObserver
(
checkVideoExists
)
onMounted
(
function
()
{
...
...
@@ -100,7 +100,7 @@ onUnmounted(() => {
})
</
script
>
<
style
lang=
"less"
scoped
>
:deep
(
.video-cont
video
)
{
:deep
(
[
data-self
=
'vc'
]
video
),
:deep
(
.agora_video_player
)
{
transform
:
none
!important
;
}
</
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