Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
mobile-group
galaxy-iOS
Commits
98aaa7e9
Commit
98aaa7e9
authored
Dec 25, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into develop
parents
1073ba8f
c32a6947
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
YHLivePlayerViewController.swift
.../LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
+11
-5
No files found.
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
View file @
98aaa7e9
...
...
@@ -29,6 +29,8 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
private
var
timer
:
DispatchSourceTimer
?
private
var
isDisappearFromZoom
=
false
private
let
timeCount
:
Int
=
120
// 进聊天室尝试次数
private
let
maxRetryCount
=
3
// MARK: - UI Components
...
...
@@ -347,12 +349,16 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
// MARK: - Chat Room Methods
private
func
joinChatRoom
(
roomId
:
String
)
{
func
joinRoom
()
{
func
joinRoom
(
retryCount
:
Int
)
{
YHIMHelper
.
shared
.
joinChatRoom
(
roomID
:
roomId
,
leaveOtherRooms
:
true
)
{
[
weak
self
]
error
in
guard
let
self
=
self
else
{
return
}
if
let
error
=
error
{
if
let
error
=
error
,
retryCount
<=
self
.
maxRetryCount
{
printLog
(
"joinChatRoom:
\(
error
)
"
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
TimeInterval
(
5
*
(
retryCount
+
1
)))
{
YHIMHelper
.
shared
.
registerAndLoginCurrentUser
{
_
in
joinRoom
(
retryCount
:
retryCount
+
1
)
}
}
}
else
{
self
.
loadHistoryMessages
(
roomId
:
roomId
)
}
...
...
@@ -361,10 +367,10 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
if
!
YHIMHelper
.
shared
.
isCurrentUserLogin
{
YHIMHelper
.
shared
.
registerAndLoginCurrentUser
{
_
in
joinRoom
()
joinRoom
(
retryCount
:
0
)
}
}
else
{
joinRoom
()
joinRoom
(
retryCount
:
0
)
}
}
...
...
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