Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cba0f68f
authored
Jun 26, 2025
by
pidan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bugs
parent
7458f44b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
108 additions
and
146 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/Other/FUSSocialShareHelper.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Socket/SocketMessage/FUSSocketMessageCenter.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Bundle/FUSRouterBundle.m
FuSiLive.xcodeproj/project.pbxproj
FuSiLive.xcodeproj/xcshareddata/xcschemes/FuSiLive.xcscheme
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/HomePage/View/FUSHomeNaviView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FFGiftView/FUSLiveGiftView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShareToChat/FUSLiveShareToChatView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPasswordView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartView.swift
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/Other/FUSSocialShareHelper.m
View file @
cba0f68f
...
@@ -195,7 +195,8 @@
...
@@ -195,7 +195,8 @@
NSString
*
roomPassword
=
@""
;
NSString
*
roomPassword
=
@""
;
BOOL
isPusher
=
FUSConfig
.
sharedInstanced
.
liveConfigs
.
isAnchor
;
BOOL
isPusher
=
FUSConfig
.
sharedInstanced
.
liveConfigs
.
isAnchor
;
if
(
isPusher
)
{
if
(
isPusher
&&
FUSRouter
.
liveRouter
.
fus_liveScopeType
==
4
)
{
roomPassword
=
FUSRouter
.
liveRouter
.
liveRoomPassword
;
roomPassword
=
FUSRouter
.
liveRouter
.
liveRoomPassword
;
}
}
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
View file @
cba0f68f
...
@@ -197,7 +197,11 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
...
@@ -197,7 +197,11 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
-
(
instancetype
)
init
{
-
(
instancetype
)
init
{
self
=
[
super
init
];
self
=
[
super
init
];
if
(
self
)
{
if
(
self
)
{
self
.
devLevel
=
FUSDevlopLevelRelease
;
#ifdef DEBUG
self
.
devLevel
=
FUSDevlopLevelDeveloper
;
self
.
devLevel
=
FUSDevlopLevelDeveloper
;
#endif
self
.
postJsonList
=
[
NSMutableArray
array
];
self
.
postJsonList
=
[
NSMutableArray
array
];
}
}
return
self
;
return
self
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Socket/SocketMessage/FUSSocketMessageCenter.m
View file @
cba0f68f
...
@@ -220,9 +220,9 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
...
@@ -220,9 +220,9 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
// 发送消息队列中的离线消息
// 发送消息队列中的离线消息
[
self
sendMessageFromMessageQueue
];
[
self
sendMessageFromMessageQueue
];
// 每隔
1
0s像服务器发送心跳包
// 每隔
3
0s像服务器发送心跳包
[
mConnectTimer
invalidate
];
[
mConnectTimer
invalidate
];
mConnectTimer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
1
0
target
:[
YYWeakProxy
proxyWithTarget
:
self
]
selector
:
@selector
(
sendHeartbeatPacket
)
userInfo
:
nil
repeats
:
YES
];
mConnectTimer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
3
0
target
:[
YYWeakProxy
proxyWithTarget
:
self
]
selector
:
@selector
(
sendHeartbeatPacket
)
userInfo
:
nil
repeats
:
YES
];
[
mConnectTimer
fire
];
[
mConnectTimer
fire
];
if
(
mConnectBlock
)
mConnectBlock
(
YES
);
if
(
mConnectBlock
)
mConnectBlock
(
YES
);
...
@@ -324,6 +324,7 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
...
@@ -324,6 +324,7 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
// 循环读取发送消息队列中的消息
// 循环读取发送消息队列中的消息
while
([
mSocketQueue
fus_isHaveSendMessage
])
while
([
mSocketQueue
fus_isHaveSendMessage
])
{
{
FUSLogInfo
(
@"--->发送SocketMessage while ([mSocketQueue fus_isHaveSendMessage])"
);
// 读取消息队列中的消息
// 读取消息队列中的消息
NSData
*
data
=
[
mSocketQueue
fus_readSendMessage
];
NSData
*
data
=
[
mSocketQueue
fus_readSendMessage
];
if
([
NSObject
isNullWithData
:
data
])
{
if
([
NSObject
isNullWithData
:
data
])
{
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Bundle/FUSRouterBundle.m
View file @
cba0f68f
...
@@ -96,7 +96,10 @@
...
@@ -96,7 +96,10 @@
if
(
image
==
nil
)
{
if
(
image
==
nil
)
{
image
=
[
UIImage
imageNamed
:
imageName
inBundle
:[
NSBundle
mainBundle
]
compatibleWithTraitCollection
:
nil
];
image
=
[
UIImage
imageNamed
:
imageName
inBundle
:[
NSBundle
mainBundle
]
compatibleWithTraitCollection
:
nil
];
}
}
FUSLogInfo
(
@"pidan record imageNamed = %@, bundle = %@"
,
imageName
,
bundle
);
if
(
image
==
nil
||
bundle
==
nil
)
{
FUSLogInfo
(
@"pidan record nil imageNamed = %@, bundle = %@"
,
imageName
,
bundle
);
}
return
image
;
return
image
;
}
}
...
...
FuSiLive.xcodeproj/project.pbxproj
View file @
cba0f68f
...
@@ -664,7 +664,7 @@
...
@@ -664,7 +664,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME
=
AccentColor
;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME
=
AccentColor
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
20250626000
1
;
CURRENT_PROJECT_VERSION
=
20250626000
2
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
...
@@ -932,7 +932,7 @@
...
@@ -932,7 +932,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME
=
AccentColor
;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME
=
AccentColor
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
20250626000
1
;
CURRENT_PROJECT_VERSION
=
20250626000
2
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
...
...
FuSiLive.xcodeproj/xcshareddata/xcschemes/FuSiLive.xcscheme
View file @
cba0f68f
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
disableMainThreadChecker =
"YES"
disableMainThreadChecker =
"YES"
disablePerformanceAntipatternChecker =
"YES"
launchStyle =
"0"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/HomePage/View/FUSHomeNaviView.m
View file @
cba0f68f
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
if
(
i
==
0
)
{
if
(
i
==
0
)
{
NSMutableArray
*
animationIamgesList
=
[[
NSMutableArray
alloc
]
init
];
NSMutableArray
*
animationIamgesList
=
[[
NSMutableArray
alloc
]
init
];
for
(
int
i
=
0
;
i
<
99
;
i
++
)
{
for
(
int
i
=
0
;
i
<
24
;
i
++
)
{
UIImage
*
tempImage
=
[
FUSShowRoomCenterBunble
imageNamed
:[
NSString
stringWithFormat
:
@"fusi_home_navi_follow_animate_%d"
,
i
]];
UIImage
*
tempImage
=
[
FUSShowRoomCenterBunble
imageNamed
:[
NSString
stringWithFormat
:
@"fusi_home_navi_follow_animate_%d"
,
i
]];
if
(
tempImage
==
nil
)
{
if
(
tempImage
==
nil
)
{
break
;
break
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
View file @
cba0f68f
...
@@ -596,11 +596,11 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
...
@@ -596,11 +596,11 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}];
}];
self
.
playView
.
playerVideoFrameCallBackHandler
=
^
(
NSString
*
uid
,
CVPixelBufferRef
videoFrame
)
{
//
self.playView.playerVideoFrameCallBackHandler = ^(NSString *uid, CVPixelBufferRef videoFrame) {
if
(
weakSelf
.
pipController
&&
[
uid
isEqualToString
:
weakSelf
.
playView
.
mainUID
])
{
//
if (weakSelf.pipController && [uid isEqualToString:weakSelf.playView.mainUID]) {
[
weakSelf
.
pipController
enqueuePixelBuffer
:
videoFrame
];
//
[weakSelf.pipController enqueuePixelBuffer:videoFrame];
}
//
}
};
//
};
return
;
return
;
}
}
...
@@ -2245,6 +2245,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
...
@@ -2245,6 +2245,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
[
self
performSelector
:
@selector
(
setupPictureInPicture
)
afterDelay
:
0
.
3
];
[
self
performSelector
:
@selector
(
setupPictureInPicture
)
afterDelay
:
0
.
3
];
}
}
-
(
void
)
setupPictureInPicture
{
-
(
void
)
setupPictureInPicture
{
return
;
if
(
self
.
autoStartPictureInPicture
==
NO
)
{
if
(
self
.
autoStartPictureInPicture
==
NO
)
{
return
;
return
;
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
cba0f68f
...
@@ -808,15 +808,15 @@
...
@@ -808,15 +808,15 @@
}
}
// 进入包房错误消息处理
// 进入包房错误消息处理
+
(
void
)
joinRoomFailuerWithErrorDict
:
(
NSDictionary
*
)
errorDict
code
:
(
int
)
code
msg
:
(
NSString
*
)
msg
{
-
(
void
)
joinRoomFailuerWithErrorDict
:
(
NSDictionary
*
)
errorDict
code
:
(
int
)
code
msg
:
(
NSString
*
)
msg
currentRoomId
:
(
NSString
*
)
currentRoomId
password
:
(
NSString
*
)
password
{
[[
FUSLiveHelper
shareInstance
].
liveVC
.
liveFunctionView
fus_cleanFunctionView
];
[[
FUSLiveHelper
shareInstance
].
liveVC
.
playView
fus_stopWithUID
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
fus_showLiveLoadingViewWithType
:
liveLoadingDismiss
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
fus_stopPlay
];
FUSLogInfo
(
@"%@"
,
msg
);
if
(
code
==
-
20036
)
{
if
(
code
==
-
20036
)
{
[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
fus_setValueWithDict
:
errorDict
];
[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
fus_setValueWithDict
:
errorDict
];
[[
FUSLiveHelper
shareInstance
].
liveVC
.
playView
fus_stopALLPlayer
];
// 官方控制违规下播
// 官方控制违规下播
if
([
errorDict
[
@"cause"
]
intValue
]
==
1
)
{
if
([
errorDict
[
@"cause"
]
intValue
]
==
1
)
{
FUSVideoOfficialEndV2View
*
officialEndView
=
[[
FUSVideoOfficialEndV2View
alloc
]
initWithFrame
:
UIView
.
fus_screenFrame
];
FUSVideoOfficialEndV2View
*
officialEndView
=
[[
FUSVideoOfficialEndV2View
alloc
]
initWithFrame
:
UIView
.
fus_screenFrame
];
...
@@ -826,7 +826,7 @@
...
@@ -826,7 +826,7 @@
paragraphStyle
.
lineSpacing
=
5
.
0
f
;
paragraphStyle
.
lineSpacing
=
5
.
0
f
;
NSString
*
errMsg
=
errorDict
[
@"msg"
];
NSString
*
errMsg
=
errorDict
[
@"msg"
];
//
NSString *errMsg = @"由于出现违规内容,本直播间被停止播放了,请稍后再试,本直播间被停止播放了,请稍后再试,本直播间被停止播放了,请稍后再试";
//
NSString *errMsg = @"由于出现违规内容,本直播间被停止播放了,请稍后再试,本直播间被停止播放了,请稍后再试,本直播间被停止播放了,请稍后再试";
if
([
NSString
isNull
:
errMsg
])
{
if
([
NSString
isNull
:
errMsg
])
{
errMsg
=
@""
;
errMsg
=
@""
;
}
}
...
@@ -848,17 +848,36 @@
...
@@ -848,17 +848,36 @@
// 直播已结束
// 直播已结束
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
initLiveEndViewWithInfoDict
:
errorDict
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
initLiveEndViewWithInfoDict
:
errorDict
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Did_End_Live_Notification
object
:
currentRoomId
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Refresh
object
:
nil
];
}
else
if
(
code
==
-
20060
)
{
}
else
if
(
code
==
-
20060
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Refresh
object
:
nil
];
// V6.1.0 改成直接退出toast提示
// V6.1.0 改成直接退出toast提示
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"您已被踢出房间,暂时不能进入"
]];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"您已被踢出房间,暂时不能进入"
]];
// 您已被移除直播,暂时不能进入
// // 您已被移除直播,暂时不能进入
}
else
if
(
code
==
-
20019
)
{
}
else
if
(
code
==
-
20080
)
{
// 包房已满
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Refresh
object
:
nil
];
[
FUSAlertView
showAlertWithTitle
:
nil
message
:[
NSString
fus_localString
:
@"包房已满,请稍后再试"
]
cancelButtonTitle
:
[
NSString
fus_localString
:
@"确定"
]
otherButtonTitles
:
nil
clickBlock
:^
(
NSInteger
buttonIndex
)
{
// 没有私密房权限
[
self
.
currentFunctionView
fus_hideAllFunctionLayers
];
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
errorDict
[
@"msg"
]
cancelButtonTitle
:
[
NSString
fus_localString
:
@"确定"
]
otherButtonTitles
:
nil
clickBlock
:^
(
NSInteger
buttonIndex
)
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
}];
}];
}
else
{
// 其他情况
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
msg
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"确定"
],
[
NSString
fus_localString
:
@"退出"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
0
)
{
[
self
fus_audienceJoinRoomWithRoomId
:
currentRoomId
password
:
password
];
}
else
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
}
}];
}
if
(
self
.
enterRoomFailureBlock
){
self
.
enterRoomFailureBlock
();
}
}
}
}
...
@@ -1253,19 +1272,8 @@
...
@@ -1253,19 +1272,8 @@
FUSLogInfo
(
@"不是当前包房"
);
FUSLogInfo
(
@"不是当前包房"
);
return
;
return
;
}
}
// 其他情况
[
FUSAlertView
showAlertWithTitle
:
nil
message
:[
NSString
fus_localString
:
@"网络出错,是否重新进入包房?"
]
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"确定"
],
[
NSString
fus_localString
:
@"退出"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
0
)
{
[
self
fus_audienceJoinRoomWithStreamUrl
:
originalStreamUrl
roomId
:
currentRoomId
];
}
else
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
}
}];
if
(
weakSelf
.
enterRoomFailureBlock
){
[
weakSelf
joinRoomFailuerWithErrorDict
:
errorDict
code
:
code
msg
:
msg
currentRoomId
:
currentRoomId
password
:
@""
];
weakSelf
.
enterRoomFailureBlock
();
}
}];
}];
}
}
...
@@ -1388,77 +1396,7 @@
...
@@ -1388,77 +1396,7 @@
FUSLogInfo
(
@"不是当前包房"
);
FUSLogInfo
(
@"不是当前包房"
);
return
;
return
;
}
}
[
weakSelf
joinRoomFailuerWithErrorDict
:
errorDict
code
:
code
msg
:
msg
currentRoomId
:
currentRoomId
password
:
password
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
fus_showLiveLoadingViewWithType
:
liveLoadingDismiss
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
fus_stopPlay
];
FUSLogInfo
(
@"%@"
,
msg
);
if
(
code
==
-
20036
)
{
[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
fus_setValueWithDict
:
errorDict
];
// 官方控制违规下播
if
([
errorDict
[
@"cause"
]
intValue
]
==
1
)
{
FUSVideoOfficialEndV2View
*
officialEndView
=
[[
FUSVideoOfficialEndV2View
alloc
]
initWithFrame
:
UIView
.
fus_screenFrame
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
].
view
addSubview
:
officialEndView
];
NSMutableParagraphStyle
*
paragraphStyle
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle
.
alignment
=
NSTextAlignmentCenter
;
paragraphStyle
.
lineSpacing
=
5
.
0
f
;
NSString
*
errMsg
=
errorDict
[
@"msg"
];
// NSString *errMsg = @"由于出现违规内容,本直播间被停止播放了,请稍后再试,本直播间被停止播放了,请稍后再试,本直播间被停止播放了,请稍后再试";
if
([
NSString
isNull
:
errMsg
])
{
errMsg
=
@""
;
}
NSAttributedString
*
str
=
[[
NSAttributedString
alloc
]
initWithString
:
errMsg
attributes
:@{
NSParagraphStyleAttributeName
:
paragraphStyle
,
NSForegroundColorAttributeName
:
[
UIColor
whiteColor
]}];
officialEndView
.
contentLabel
.
attributedText
=
str
;
officialEndView
.
closeClickBlock
=
^
()
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
};
return
;
}
else
if
([
errorDict
[
@"cause"
]
intValue
]
==
2
)
{
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
errorDict
[
@"msg"
]
cancelButtonTitle
:
[
NSString
fus_localString
:
@"确定"
]
otherButtonTitles
:
nil
clickBlock
:^
(
NSInteger
buttonIndex
)
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
}];
return
;
}
// 直播已结束
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
initLiveEndViewWithInfoDict
:
errorDict
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Did_End_Live_Notification
object
:
currentRoomId
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Refresh
object
:
nil
];
}
else
if
(
code
==
-
20060
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Refresh
object
:
nil
];
// V6.1.0 改成直接退出toast提示
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"您已被踢出房间,暂时不能进入"
]];
// // 您已被移除直播,暂时不能进入
}
else
if
(
code
==
-
20080
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSLiveNotificationKeys
.
fus_BaoFang_Refresh
object
:
nil
];
// 没有私密房权限
[
self
.
currentFunctionView
fus_hideAllFunctionLayers
];
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
errorDict
[
@"msg"
]
cancelButtonTitle
:
[
NSString
fus_localString
:
@"确定"
]
otherButtonTitles
:
nil
clickBlock
:^
(
NSInteger
buttonIndex
)
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
}];
}
else
{
// 其他情况
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
msg
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"确定"
],
[
NSString
fus_localString
:
@"退出"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
0
)
{
[
self
fus_audienceJoinRoomWithRoomId
:
currentRoomId
password
:
password
];
}
else
{
[
FUSLiveHelper
fus_quitLiveWithCompletion
:
nil
];
}
}];
}
if
(
weakSelf
.
enterRoomFailureBlock
){
weakSelf
.
enterRoomFailureBlock
();
}
}];
}];
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FFGiftView/FUSLiveGiftView.m
View file @
cba0f68f
...
@@ -851,7 +851,7 @@ static FUSLiveGiftView *giftView = nil;
...
@@ -851,7 +851,7 @@ static FUSLiveGiftView *giftView = nil;
[
_gemBtn
setTitle
:
@"0"
forState
:
UIControlStateNormal
];
[
_gemBtn
setTitle
:
@"0"
forState
:
UIControlStateNormal
];
_gemBtn
.
contentVerticalAlignment
=
UIControlContentVerticalAlignmentCenter
;
_gemBtn
.
contentVerticalAlignment
=
UIControlContentVerticalAlignmentCenter
;
_gemBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentCenter
;
_gemBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentCenter
;
[
_gemBtn
setImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"live_room_diamond_giftPanel"
]
forState
:
UIControlStateNormal
];
//
[_gemBtn setImage:[FUSShowRoomCenterBunble imageNamed:@"live_room_diamond_giftPanel"] forState:UIControlStateNormal];
[
_gemBtn
setTitleColor
:[
UIColor
fus_diamondBlue
]
forState
:
UIControlStateNormal
];
[
_gemBtn
setTitleColor
:[
UIColor
fus_diamondBlue
]
forState
:
UIControlStateNormal
];
_gemBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
13
];
_gemBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
13
];
[
_gemBtn
sizeToFit
];
[
_gemBtn
sizeToFit
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
View file @
cba0f68f
...
@@ -5829,26 +5829,28 @@ BDAlphaPlayerMetalViewDelegate
...
@@ -5829,26 +5829,28 @@ BDAlphaPlayerMetalViewDelegate
self
.
passwordRoomIconImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
12
,
self
.
popularView
.
bottom
+
10
,
49
,
49
)];
self
.
passwordRoomIconImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
12
,
self
.
popularView
.
bottom
+
10
,
49
,
49
)];
self
.
passwordRoomIconImageView
.
centerX
=
self
.
popularView
.
centerX
;
self
.
passwordRoomIconImageView
.
centerX
=
self
.
popularView
.
centerX
;
self
.
passwordRoomIconImageView
.
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"live_room_password_room_icon"
];
self
.
passwordRoomIconImageView
.
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"live_room_password_room_icon"
];
[[
self
fus_viewWithLayer
:
FUSLiveFunctionLayerRoomInfos
]
addSubview
:
self
.
passwordRoomIconImageView
];
[[
self
fus_viewWithLayer
:
FUSLiveFunctionLayerRoomInfos
]
addSubview
:
self
.
passwordRoomIconImageView
];
[
self
.
passwordAnimPlayView
stop
];
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
)
{
[
self
.
passwordAnimPlayView
removeFromSuperview
];
self
.
passwordAnimPlayView
=
nil
;
[
self
.
passwordAnimPlayView
stop
];
[
self
.
passwordAnimPlayView
removeFromSuperview
];
self
.
passwordAnimPlayView
=
[[
BDAlphaPlayerMetalView
alloc
]
initWithDelegate
:
self
];
self
.
passwordAnimPlayView
=
nil
;
self
.
passwordAnimPlayView
.
frame
=
UIView
.
fus_screenFrame
;
self
.
passwordAnimPlayView
.
contentMode
=
UIViewContentModeScaleToFill
;
self
.
passwordAnimPlayView
=
[[
BDAlphaPlayerMetalView
alloc
]
initWithDelegate
:
self
];
self
.
passwordAnimPlayView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
passwordAnimPlayView
.
frame
=
UIView
.
fus_screenFrame
;
[
FUSLiveHelper
.
shareInstance
.
currentLiveVCView
addSubview
:
self
.
passwordAnimPlayView
];
self
.
passwordAnimPlayView
.
contentMode
=
UIViewContentModeScaleToFill
;
self
.
passwordAnimPlayView
.
backgroundColor
=
[
UIColor
clearColor
];
NSString
*
animPath
=
[[
FUSShowRoomCenterBunble
bundle
]
pathForResource
:
@"live_password_room_anim"
ofType
:
@"mp4"
];
[
FUSLiveHelper
.
shareInstance
.
currentLiveVCView
addSubview
:
self
.
passwordAnimPlayView
];
BDAlphaPlayerMetalConfiguration
*
configuration
=
[
BDAlphaPlayerMetalConfiguration
defaultConfiguration
];
configuration
.
directory
=
animPath
;
NSString
*
animPath
=
[[
FUSShowRoomCenterBunble
bundle
]
pathForResource
:
@"live_password_room_anim"
ofType
:
@"mp4"
];
configuration
.
renderSuperViewFrame
=
UIView
.
fus_screenFrame
;
BDAlphaPlayerMetalConfiguration
*
configuration
=
[
BDAlphaPlayerMetalConfiguration
defaultConfiguration
];
configuration
.
orientation
=
BDAlphaPlayerOrientationPortrait
;
configuration
.
directory
=
animPath
;
configuration
.
renderSuperViewFrame
=
UIView
.
fus_screenFrame
;
[
self
.
passwordAnimPlayView
playWithMetalConfiguration
:
configuration
];
configuration
.
orientation
=
BDAlphaPlayerOrientationPortrait
;
[
self
.
passwordAnimPlayView
playWithMetalConfiguration
:
configuration
];
}
}
}
-
(
void
)
fus_setAnchorAudioClose
:
(
BOOL
)
closed
{
-
(
void
)
fus_setAnchorAudioClose
:
(
BOOL
)
closed
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShareToChat/FUSLiveShareToChatView.m
View file @
cba0f68f
...
@@ -327,7 +327,11 @@
...
@@ -327,7 +327,11 @@
[
dict
enumerateKeysAndObjectsUsingBlock
:
^
(
NSString
*
_Nonnull
key
,
FUSLiveShareToChatModel
*
_Nonnull
model
,
BOOL
*
_Nonnull
stop
)
{
[
dict
enumerateKeysAndObjectsUsingBlock
:
^
(
NSString
*
_Nonnull
key
,
FUSLiveShareToChatModel
*
_Nonnull
model
,
BOOL
*
_Nonnull
stop
)
{
[
FUSRouter
.
chatRouter
fus_sendLiveRoomShareWith
:
roomModel
toUser
:
model
.
uid
userFace
:
model
.
face
userNick
:
model
.
nickname
password
:
roomModel
.
encryptionData
.
password
];
NSString
*
password
=
@""
;
if
(
FUSLiveHelper
.
shareInstance
.
roomScopeType
==
FUSLiveRoomScopeTypePassword
)
{
password
=
roomModel
.
encryptionData
.
password
;
}
[
FUSRouter
.
chatRouter
fus_sendLiveRoomShareWith
:
roomModel
toUser
:
model
.
uid
userFace
:
model
.
face
userNick
:
model
.
nickname
password
:
password
];
}];
}];
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"分享成功"
]];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"分享成功"
]];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPasswordView.swift
View file @
cba0f68f
...
@@ -11,13 +11,14 @@ import RxSwift
...
@@ -11,13 +11,14 @@ import RxSwift
@objcMembers
public
class
FUSLiveStartSetPasswordView
:
UIView
{
@objcMembers
public
class
FUSLiveStartSetPasswordView
:
UIView
{
///可以用这个快速创建,本身内部不请求改变房间类型,用于开播前
///可以用这个快速创建,本身内部不请求改变房间类型,用于开播前
static
public
func
fus_create
(
clickHandler
:
@escaping
(
_
password
:
String
)
->
Void
){
static
public
func
fus_create
(
clickHandler
:
@escaping
(
_
succeed
:
Bool
,
_
password
:
String
)
->
Void
){
guard
let
showVC
=
UINavigationController
.
fus_top
()
else
{
return
}
guard
let
showVC
=
UINavigationController
.
fus_top
()
else
{
return
}
let
view
=
FUSLiveStartSetPasswordView
(
frame
:
showVC
.
view
.
bounds
,
isAudience
:
false
,
password
:
FUSRouter
.
live
()
.
liveRoomPassword
())
let
view
=
FUSLiveStartSetPasswordView
(
frame
:
showVC
.
view
.
bounds
,
isAudience
:
false
,
password
:
FUSRouter
.
live
()
.
liveRoomPassword
())
view
.
clickHandler
=
{
password
in
clickHandler
(
password
)
view
.
clickWithSucceedHandler
=
{
succeed
,
password
in
clickHandler
(
succeed
,
password
)
}
}
showVC
.
view
.
addSubview
(
view
)
showVC
.
view
.
addSubview
(
view
)
...
@@ -43,7 +44,6 @@ import RxSwift
...
@@ -43,7 +44,6 @@ import RxSwift
let
disposeBag
=
DisposeBag
()
let
disposeBag
=
DisposeBag
()
var
clickHandler
:((
String
)
->
Void
)?
var
clickWithSucceedHandler
:((
Bool
,
String
)
->
Void
)?
var
clickWithSucceedHandler
:((
Bool
,
String
)
->
Void
)?
var
password
:
String
=
""
var
password
:
String
=
""
var
isAudience
:
Bool
=
false
var
isAudience
:
Bool
=
false
...
@@ -218,7 +218,6 @@ import RxSwift
...
@@ -218,7 +218,6 @@ import RxSwift
}
}
func
fus_dismissWithAnimation
(){
func
fus_dismissWithAnimation
(){
self
.
clickHandler
?(
self
.
password
)
UIView
.
animate
(
withDuration
:
0.3
)
{
UIView
.
animate
(
withDuration
:
0.3
)
{
self
.
contentView
.
y
=
UIView
.
fus_screenH
()
self
.
contentView
.
y
=
UIView
.
fus_screenH
()
}
completion
:
{
_
in
}
completion
:
{
_
in
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
View file @
cba0f68f
...
@@ -155,11 +155,14 @@ import FUSCommon
...
@@ -155,11 +155,14 @@ import FUSCommon
self
.
contentView
.
y
=
UIView
.
fus_screenH
()
self
.
contentView
.
y
=
UIView
.
fus_screenH
()
}
completion
:
{
_
in
}
completion
:
{
_
in
FUSLiveStartSetPasswordView
.
fus_create
{
[
weak
self
]
password
in
FUSLiveStartSetPasswordView
.
fus_create
(
clickHandler
:
{
[
weak
self
]
succeed
,
password
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
//在内部请求
//在内部请求
self
.
fus_changeScopeRequest
(
scopeType
:
self
.
scopeType
,
password
:
password
)
if
succeed
{
}
self
.
fus_changeScopeRequest
(
scopeType
:
self
.
scopeType
,
password
:
password
)
}
})
}
}
}
}
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartView.swift
View file @
cba0f68f
...
@@ -197,15 +197,20 @@ import FUSCommon
...
@@ -197,15 +197,20 @@ import FUSCommon
guard
let
model
=
self
?
.
startLiveModel
.
value
else
{
return
}
guard
let
model
=
self
?
.
startLiveModel
.
value
else
{
return
}
FUSLiveStartSetPrivacyView
.
fus_create
(
defaultScopeType
:
model
.
scopeType
)
{[
weak
self
]
scopeType
in
FUSLiveStartSetPrivacyView
.
fus_create
(
defaultScopeType
:
model
.
scopeType
)
{[
weak
self
]
scopeType
in
model
.
scopeType
=
scopeType
if
scopeType
==
.
password
{
if
scopeType
==
.
password
{
FUSLiveStartSetPasswordView
.
fus_create
{
password
in
FUSLiveStartSetPasswordView
.
fus_create
(
clickHandler
:
{
[
weak
self
]
succeed
,
password
in
model
.
password
=
password
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
password
=
password
if
succeed
{
self
?
.
startLiveModel
.
accept
(
model
)
model
.
scopeType
=
scopeType
}
model
.
password
=
password
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
password
=
password
self
?
.
startLiveModel
.
accept
(
model
)
}
})
}
else
{
}
else
{
model
.
scopeType
=
scopeType
self
?
.
startLiveModel
.
accept
(
model
)
self
?
.
startLiveModel
.
accept
(
model
)
}
}
}
}
...
@@ -221,11 +226,13 @@ import FUSCommon
...
@@ -221,11 +226,13 @@ import FUSCommon
//关闭按钮
//关闭按钮
passwordBtn
.
rx
.
tap
.
subscribe
(
onNext
:
{[
weak
self
]
in
passwordBtn
.
rx
.
tap
.
subscribe
(
onNext
:
{[
weak
self
]
in
guard
let
model
=
self
?
.
startLiveModel
.
value
else
{
return
}
guard
let
model
=
self
?
.
startLiveModel
.
value
else
{
return
}
FUSLiveStartSetPasswordView
.
fus_create
{
password
in
FUSLiveStartSetPasswordView
.
fus_create
(
clickHandler
:
{
[
weak
self
]
succeed
,
password
in
model
.
password
=
password
if
succeed
{
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
password
=
password
model
.
password
=
password
self
?
.
startLiveModel
.
accept
(
model
)
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
password
=
password
}
self
?
.
startLiveModel
.
accept
(
model
)
}
})
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
//关闭按钮
//关闭按钮
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.m
View file @
cba0f68f
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#import "FUSCommon/FUSCommon-Swift.h"
#import "FUSCommon/FUSCommon-Swift.h"
//#import <Bugly/Bugly.h>
@interface
FUSLoginHelper
()
@interface
FUSLoginHelper
()
/**
/**
...
...
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