Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SpeakEzy_Frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thisara Kavinda
SpeakEzy_Frontend
Commits
12bb82c0
Commit
12bb82c0
authored
May 19, 2024
by
Shehan Liyanage
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'SignLanguage-new-Changes' into 'develop'
add sweetAlert See merge request
!13
parents
298b19eb
bbee5a38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/Components/MeetingLayout/MeetingLayout.tsx
src/Components/MeetingLayout/MeetingLayout.tsx
+18
-0
No files found.
src/Components/MeetingLayout/MeetingLayout.tsx
View file @
12bb82c0
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'
react
'
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'
react
'
import
{
Box
}
from
'
@mui/material
'
import
{
Box
}
from
'
@mui/material
'
import
{
useTheme
,
Theme
}
from
'
@mui/material/styles
'
import
{
useTheme
,
Theme
}
from
'
@mui/material/styles
'
import
Swal
from
'
sweetalert2
'
// Import SweetAlert2
import
{
useRemoteUsers
,
usePublish
,
useRTCClient
,
useClientEvent
}
from
'
agora-rtc-react
'
import
{
useRemoteUsers
,
usePublish
,
useRTCClient
,
useClientEvent
}
from
'
agora-rtc-react
'
import
SymmetricGrid
from
'
../SymmetricGrid/SymmetricGrid
'
import
SymmetricGrid
from
'
../SymmetricGrid/SymmetricGrid
'
import
PinnedGrid
from
'
../PinnedGrid/PinnedGrid
'
import
PinnedGrid
from
'
../PinnedGrid/PinnedGrid
'
...
@@ -33,6 +34,7 @@ const MeetingLayout = ({ setJoined, localCameraTrack, localMicrophoneTrack }: Pr
...
@@ -33,6 +34,7 @@ const MeetingLayout = ({ setJoined, localCameraTrack, localMicrophoneTrack }: Pr
const
[
isPinned
,
setIsPinned
]
=
useState
(
false
)
const
[
isPinned
,
setIsPinned
]
=
useState
(
false
)
const
[
pinnedUser
,
setPinnedUser
]
=
useState
<
IAgoraRTCRemoteUser
|
null
>
(
null
)
const
[
pinnedUser
,
setPinnedUser
]
=
useState
<
IAgoraRTCRemoteUser
|
null
>
(
null
)
const
[
isCaptionEnable
,
setIsCaptionEnable
]
=
useState
(
false
)
const
[
isCaptionEnable
,
setIsCaptionEnable
]
=
useState
(
false
)
const
[
isMeetingStarted
,
setIsMeetingStarted
]
=
useState
(
false
)
useEffect
(()
=>
{
useEffect
(()
=>
{
setTotalUsers
(
remoteUsers
.
length
+
1
)
setTotalUsers
(
remoteUsers
.
length
+
1
)
...
@@ -53,6 +55,22 @@ const MeetingLayout = ({ setJoined, localCameraTrack, localMicrophoneTrack }: Pr
...
@@ -53,6 +55,22 @@ const MeetingLayout = ({ setJoined, localCameraTrack, localMicrophoneTrack }: Pr
useClientEvent
(
agoraEngine
,
'
user-left
'
,
handleUserLeft
)
useClientEvent
(
agoraEngine
,
'
user-left
'
,
handleUserLeft
)
// Show a popup when the meeting starts
useEffect
(()
=>
{
if
(
!
isMeetingStarted
)
{
void
Swal
.
fire
({
title
:
'
Meeting Started
'
,
text
:
'
Sign language prediction might be delayed due to the live meeting.
'
,
icon
:
'
info
'
,
timer
:
5000
,
// Display the popup for 5 seconds
timerProgressBar
:
true
,
willClose
:
()
=>
{
setIsMeetingStarted
(
true
)
},
})
}
},
[
isMeetingStarted
])
return
(
return
(
<
Box
<
Box
sx=
{
{
sx=
{
{
...
...
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