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
6e958c87
authored
Jun 08, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
08644cfd
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
320 additions
and
88 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Chinese_Traditional.strings
FuSiLive.xcworkspace/xcshareddata/swiftpm/Package.resolved
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMChatAudioManager.m
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMChatService.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/LiveSettingAlertView/FUSLiveAnchorSettingAlertView.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Controller/FUSNewsFeedDetailViewController.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Other/FUSNewsFeedDataHelper.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Views/FUSNewsFeedCommentView.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Views/FUSNewsFeedReplyListHeaderView.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/LiveSetting/FUSLiveAudienceSettingViewController.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
View file @
6e958c87
...
...
@@ -77,12 +77,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
/// App Version
-
(
NSString
*
)
appVersion
{
return
@"78
50
"
;
return
@"78
36
"
;
}
/// App Dot Version
-
(
NSString
*
)
appDotVersion
{
return
@"7.8.
5.0
"
;
return
@"7.8.
3.6
"
;
}
/// App Id
...
...
@@ -155,12 +155,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
/// TikTok 应用事件 SDK 的 TikTok App ID
-
(
NSString
*
)
tikTokBusinessAppId
{
return
@"76
39294434219130896
"
;
return
@"76
47442763411111943
"
;
}
/// TikTok 应用事件 SDK 的密钥
-
(
NSString
*
)
tikTokBusinessAccessToken
{
return
@"
f1ca59121d93098d2970b2f3b62cd06fca70dfae
"
;
return
@"
TTAGdcOSYo9mkgWwLkHRZS7aqZ0xuAGd
"
;
}
/// 声网的 key
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Chinese_Traditional.strings
View file @
6e958c87
...
...
@@ -3496,8 +3496,7 @@
"进入限时表演" = "進入限時表演";
"购票看秀
" = "购票看秀";
"购票看秀" = "購票看秀";
"已集票数 %zd 张!" = "已集票數 %zd 張!";
...
...
@@ -3610,3 +3609,8 @@
"张票已全部退回" = "張票已全部退回";
"本活动由主播个人主办,详细活动办法与内容请咨询主播。集票达成或未达成主播自愿表演,本活动才算成立;若集票未达成且主播不愿意表演,则活动取消,并退回宝石。若活动已经开始表演,请注意剩余时间,确保您不会错过精彩表演时刻。本平台保留活动说明的权利,可随时修改、变更及解释活动之权利。" = "本活動由主播個人主辦,詳細活動辦法與內容請洽詢主播。集票達成或未達成主播自願表演,本活動才算成立;若集票未達成且主播不願意表演,則活動取消,並退回寶石。若活動已經開始表演,請注意剩餘時間,確保你不會錯過精彩表演時刻。本平台保有活動說明的權利,可隨時修改、變更及解釋活動之權利。";
"完善個人資料,回復私信獲得更高分成," = "完善個人資料,回覆私信獲得更高分成,";
"去完善 >" = "去完善 >";
FuSiLive.xcworkspace/xcshareddata/swiftpm/Package.resolved
0 → 100644
View file @
6e958c87
{
"originHash" : "e5d0f68effe33090a2fe9ffff53474a349a46eb9093528d7ce8c0e56fd3cd927",
"pins" : [
{
"identity" : "tiktok-business-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tiktok/tiktok-business-ios-sdk",
"state" : {
"revision" : "4d330d4da158190d2c67b2142c2bd36c9eb5291e",
"version" : "1.6.1"
}
}
],
"version" : 3
}
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMChatAudioManager.m
View file @
6e958c87
...
...
@@ -8,6 +8,7 @@
#import "FUSIMChatAudioManager.h"
#import "FUSIMChatCellHelper.h"
#import <HyphenateChat/HyphenateChat.h>
@interface
FUSIMChatAudioManager
()
...
...
@@ -66,52 +67,12 @@
点击播放
*/
-
(
void
)
fus_startPlayingAudio
{
//开始动画,改变按钮选中状态
[
_playingAudioView
fus_startPlayAudioAnimation
];
_isStop
=
NO
;
//还原当前播放时间
_currentTime
=
0
;
//初始化语音播放器
if
([[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
]
!=
0
&&
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
]
!=
1
)
{
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@0
forKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
];
}
[
FUSAudioHelper
shareInstance
].
outputType
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
];
//判断播放器类型
[
FUSIMChatCellHelper
fus_changeAudioPlayerWithAudioOutputType
:[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
]];
//开始播放
NSCharacterSet
*
encodeUrlSet
=
[
NSCharacterSet
URLQueryAllowedCharacterSet
];
if
(
_msgModel
.
messageDirection
==
FUSMsgDirectionSend
)
{
_msgModel
.
voiceLocalPath
=
[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)[
0
]
stringByAppendingPathComponent
:[
_msgModel
.
voiceLocalPath
componentsSeparatedByString
:
@"Documents/"
].
lastObject
];
}
NSURL
*
audioUrl
=
[
NSURL
URLWithString
:[
_msgModel
.
voiceLocalPath
stringByAddingPercentEncodingWithAllowedCharacters
:
encodeUrlSet
]];
// if([[NSFileManager defaultManager] fileExistsAtPath:audioUrl.path]){
// NSLog(@"");
// }else{
// NSLog(@"");
// }
[
FUSAudioHelper
playWithFilePath
:
audioUrl
progress
:
^
(
NSTimeInterval
currentTime
)
{
_currentTime
=
(
int
)
currentTime
;
if
(
_isReuse
||
[
_msgModel
.
voiceDuration
intValue
]
<
(
int
)
currentTime
)
return
;
//已被复用,时间不动
_playingAudioView
.
audioTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d
\"
"
,
[
_msgModel
.
voiceDuration
intValue
]
-
(
int
)
currentTime
];
}
playToEndHandler
:^
{
FUSLogInfo
(
@"==播放结束=="
);
[
self
fus_stopPlayingAudio
];
//播放结束回调
[
self
audioStopPlayingWithMessageModel
:
_frameModel
];
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
fus_preparePlayableAudioFileURLWithCompletion
:
^
(
NSURL
*
audioFileURL
)
{
[
weakSelf
fus_startPlayingAudioWithURL
:
audioFileURL
];
}
failure
:
^
{
[
weakSelf
fus_stopPlayingAudio
];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"语音播放失败"
]];
}];
}
...
...
@@ -197,6 +158,213 @@
_msgModel
=
_frameModel
.
msgModel
;
}
#pragma mark - Private
/// 准备可播放的语音文件。接收方需要确保附件已下载,并将 amr 转为播放器可直接播放的 wav。
-
(
void
)
fus_preparePlayableAudioFileURLWithCompletion
:
(
void
(
^
)(
NSURL
*
audioFileURL
))
completion
failure
:
(
void
(
^
)(
void
))
failure
{
if
(
!
[
self
.
msgModel
isKindOfClass
:
FUSChatDetailMessageModel
.
class
])
{
if
(
failure
)
{
failure
();
}
return
;
}
__weak
typeof
(
self
)
weakSelf
=
self
;
if
(
self
.
msgModel
.
messageDirection
==
FUSMsgDirectionSend
)
{
NSString
*
sendVoicePath
=
[
self
fus_normalizedSendVoicePath
];
if
(
sendVoicePath
.
length
==
0
||
!
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
sendVoicePath
])
{
if
(
failure
)
{
failure
();
}
return
;
}
self
.
msgModel
.
voiceLocalPath
=
sendVoicePath
;
if
(
completion
)
{
completion
([
NSURL
fileURLWithPath
:
sendVoicePath
]);
}
return
;
}
if
(
self
.
msgModel
.
voiceLocalPath
.
length
>
0
&&
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
self
.
msgModel
.
voiceLocalPath
])
{
if
(
completion
)
{
completion
([
NSURL
fileURLWithPath
:
self
.
msgModel
.
voiceLocalPath
]);
}
return
;
}
if
(
!
[
self
.
msgModel
.
message
.
body
isKindOfClass
:
EMVoiceMessageBody
.
class
])
{
if
(
failure
)
{
failure
();
}
return
;
}
EMVoiceMessageBody
*
voiceBody
=
(
EMVoiceMessageBody
*
)
self
.
msgModel
.
message
.
body
;
[
self
fus_prepareReceiveVoicePathWithBody
:
voiceBody
completion
:
^
(
NSString
*
voicePath
)
{
if
(
voicePath
.
length
==
0
||
!
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
voicePath
])
{
if
(
failure
)
{
failure
();
}
return
;
}
weakSelf
.
msgModel
.
voiceLocalPath
=
voicePath
;
if
(
completion
)
{
completion
([
NSURL
fileURLWithPath
:
voicePath
]);
}
}
failure
:
failure
];
}
/// 开始播放已经准备好的本地语音文件。
-
(
void
)
fus_startPlayingAudioWithURL
:
(
NSURL
*
)
audioUrl
{
if
(
!
[
audioUrl
isFileURL
])
{
[
self
fus_stopPlayingAudio
];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"语音播放失败"
]];
return
;
}
// 开始动画,改变按钮选中状态。
[
self
.
playingAudioView
fus_startPlayAudioAnimation
];
_isStop
=
NO
;
// 还原当前播放时间。
_currentTime
=
0
;
// 初始化语音播放器。
if
([[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
]
!=
0
&&
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
]
!=
1
)
{
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@0
forKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
];
}
[
FUSAudioHelper
shareInstance
].
outputType
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
];
// 判断播放器类型。
[
FUSIMChatCellHelper
fus_changeAudioPlayerWithAudioOutputType
:[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_AUDIO_OUTPUT_TYPE
]
integerValue
]];
__weak
typeof
(
self
)
weakSelf
=
self
;
AVAudioPlayer
*
player
=
[
FUSAudioHelper
playWithFilePath
:
audioUrl
progress
:
^
(
NSTimeInterval
currentTime
)
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
!
strongSelf
)
{
return
;
}
strongSelf
.
currentTime
=
(
int
)
currentTime
;
if
(
strongSelf
.
isReuse
||
[
strongSelf
.
msgModel
.
voiceDuration
intValue
]
<
(
int
)
currentTime
)
return
;
// 已被复用,时间不动。
strongSelf
.
playingAudioView
.
audioTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d
\"
"
,
[
strongSelf
.
msgModel
.
voiceDuration
intValue
]
-
(
int
)
currentTime
];
}
playToEndHandler
:^
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
!
strongSelf
)
{
return
;
}
FUSLogInfo
(
@"==播放结束=="
);
[
strongSelf
fus_stopPlayingAudio
];
// 播放结束回调。
[
strongSelf
audioStopPlayingWithMessageModel
:
strongSelf
.
frameModel
];
}];
if
(
!
player
)
{
[
self
fus_stopPlayingAudio
];
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"语音播放失败"
]];
}
}
/// 发送方语音可能是 Documents 相对路径,这里统一还原成绝对可读路径。
-
(
NSString
*
)
fus_normalizedSendVoicePath
{
if
(
self
.
msgModel
.
voiceLocalPath
.
length
==
0
)
{
return
@""
;
}
if
([[
NSFileManager
defaultManager
]
fileExistsAtPath
:
self
.
msgModel
.
voiceLocalPath
])
{
return
self
.
msgModel
.
voiceLocalPath
;
}
NSString
*
documentPath
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
).
firstObject
;
NSString
*
relativePath
=
[
self
.
msgModel
.
voiceLocalPath
componentsSeparatedByString
:
@"Documents/"
].
lastObject
;
if
(
relativePath
.
length
==
0
)
{
return
self
.
msgModel
.
voiceLocalPath
;
}
return
[
documentPath
stringByAppendingPathComponent
:
relativePath
];
}
/// 接收方播放前需要保证语音附件已下载完成,并转换成 wav。
-
(
void
)
fus_prepareReceiveVoicePathWithBody
:
(
EMVoiceMessageBody
*
)
voiceBody
completion
:
(
void
(
^
)(
NSString
*
voicePath
))
completion
failure
:
(
void
(
^
)(
void
))
failure
{
NSString
*
localPath
=
voiceBody
.
localPath
?:
@""
;
if
(
localPath
.
length
>
0
&&
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
localPath
])
{
[
self
fus_convertVoicePathToPlayablePath
:
localPath
completion
:
completion
];
return
;
}
if
(
!
self
.
msgModel
.
message
)
{
if
(
failure
)
{
failure
();
}
return
;
}
[[
EMClient
sharedClient
].
chatManager
downloadMessageAttachment
:
self
.
msgModel
.
message
progress
:
nil
completion
:^
(
EMMessage
*
message
,
EMError
*
error
)
{
if
(
error
)
{
if
(
failure
)
{
failure
();
}
return
;
}
if
(
!
[
message
.
body
isKindOfClass
:
EMVoiceMessageBody
.
class
])
{
if
(
failure
)
{
failure
();
}
return
;
}
EMVoiceMessageBody
*
downloadVoiceBody
=
(
EMVoiceMessageBody
*
)
message
.
body
;
NSString
*
downloadLocalPath
=
downloadVoiceBody
.
localPath
?:
@""
;
if
(
downloadLocalPath
.
length
==
0
||
!
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
downloadLocalPath
])
{
if
(
failure
)
{
failure
();
}
return
;
}
[
self
fus_convertVoicePathToPlayablePath
:
downloadLocalPath
completion
:
completion
];
}];
}
/// 播放器优先播 wav;如果收到的是 amr,则先转换,避免接收方直接播原附件失败。
-
(
void
)
fus_convertVoicePathToPlayablePath
:
(
NSString
*
)
voicePath
completion
:
(
void
(
^
)(
NSString
*
voicePath
))
completion
{
if
(
voicePath
.
length
==
0
)
{
if
(
completion
)
{
completion
(
nil
);
}
return
;
}
if
([[
voicePath
.
pathExtension
lowercaseString
]
isEqualToString
:
@"wav"
])
{
if
(
completion
)
{
completion
(
voicePath
);
}
return
;
}
[
FUSAudioHelper
fus_concurrentConvertAMRtoWAVWithAMRPath
:
voicePath
completion
:
^
(
NSString
*
wavFilePath
)
{
if
(
completion
)
{
completion
(
wavFilePath
);
}
}];
}
@end
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMChatService.m
View file @
6e958c87
...
...
@@ -1689,7 +1689,7 @@ typedef NS_ENUM(NSInteger, FUSIMChatMessageType) {
break
;
case
FUSSystemNoticeTypeNoticeAnchorToVideoAuth
:
{
defaultNotice
=
[
NSString
stringWithFormat
:
@"%@_#{%@}#_"
,[
NSString
fus_
localString
:
@"还未进行认证,认证后,私信/声讯/视讯分润可翻倍哦,"
],[
NSString
fus_localString
:
@"去认证
>"
]];
defaultNotice
=
[
NSString
stringWithFormat
:
@"%@_#{%@}#_"
,[
NSString
fus_
versionLocalString
:
@"完善個人資料,回復私信獲得更高分成,"
],[
NSString
fus_versionLocalString
:
@"去完善
>"
]];
}
break
;
case
FUSSystemNoticeTypeNoticeRemindCloseStrangerBottle
:
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
View file @
6e958c87
...
...
@@ -112,6 +112,9 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
// 截屏分享 View
@property
(
nonatomic
,
strong
)
FUSScreenShotShareView
*
screenShotView
;
/// 记录最近一次因 Socket 恢复触发直播间重连的时间,避免短时间重复请求。
@property
(
nonatomic
,
assign
)
NSTimeInterval
lastSocketReconnectRequestTime
;
#pragma mark -- pk
// 流状态
@property
(
nonatomic
,
assign
,
readonly
)
FUSStreamState
streamState
;
...
...
@@ -338,13 +341,13 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
switch
(
status
)
{
case
AFNetworkReachabilityStatusUnknown
:
{
FUSLogInfo
(
@"网络状况未知"
);
FUSLogInfo
(
@"
AFNet
网络状况未知"
);
[
weakSelf
.
pushView
fus_stopPush
];
}
break
;
case
AFNetworkReachabilityStatusNotReachable
:
{
FUSLogInfo
(
@"网络无连接"
);
FUSLogInfo
(
@"
AFNet
网络无连接"
);
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"网络异常,请检查网络连接"
]];
[
weakSelf
fus_showLiveLoadingViewWithType
:
liveLoadingBuffering
];
weakSelf
.
playView
.
hidden
=
YES
;
...
...
@@ -353,7 +356,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
break
;
case
AFNetworkReachabilityStatusReachableViaWWAN
:
{
FUSLogInfo
(
@"运营商网络"
);
FUSLogInfo
(
@"
AFNet
运营商网络"
);
if
([
FUSLiveHelper
shareInstance
].
liveType
==
FUSLiveTypeNone
||
(
!
weakSelf
.
playView
&&
!
weakSelf
.
pushView
))
{
...
...
@@ -408,7 +411,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
break
;
case
AFNetworkReachabilityStatusReachableViaWiFi
:
{
FUSLogInfo
(
@"wifi"
);
FUSLogInfo
(
@"
AFNet
wifi"
);
if
([
FUSLiveHelper
shareInstance
].
liveType
==
FUSLiveTypeNone
||
(
!
weakSelf
.
playView
&&
!
weakSelf
.
pushView
))
{
...
...
@@ -1417,6 +1420,8 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
payRoomSwitch
:
)
name
:
STR
(
ROOM_CID_PAYROOM_SWITCH
)
object
:
nil
];
// 包房重连
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
roomReconnected
:
)
name
:
FUSLiveNotificationKeys
.
fus_Baofang_Socket_Reconnected
object
:
nil
];
// Socket 恢复在线后,补发一次直播间重连接口,兜住后台小窗场景。
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
socketStatusChanged
:
)
name
:
FUSLiveNotificationKeys
.
fus_SOCKET_STATUS_CHANGE
object
:
nil
];
// 5555 回调
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
joinRoomRecieptNotification
:
)
name
:
STR
(
ROOM_CONNECT
)
object
:
nil
];
// 拉流错误
...
...
@@ -1537,6 +1542,30 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
}
/// Socket 状态变化后,同步直播间业务重连。
-
(
void
)
socketStatusChanged
:
(
NSNotification
*
)
notification
{
NSDictionary
*
statusDict
=
(
NSDictionary
*
)
notification
.
object
;
NSInteger
status
=
[
statusDict
[
@"status"
]
integerValue
];
if
(
status
!=
SocketOnline
)
{
return
;
}
[
self
fus_requestReconnectRoomAfterSocketOnlineIfNeeded
];
}
/// Socket 重连成功后补发一次直播间重连接口,避免后台小窗恢复网络时漏掉业务重连。
-
(
void
)
fus_requestReconnectRoomAfterSocketOnlineIfNeeded
{
NSString
*
roomId
=
FUSSwiftLiveHelper
.
shared
.
roomInfoModel
.
roomId
?:
@""
;
if
([
NSString
isNull
:
roomId
]
||
FUSSwiftLiveHelper
.
shared
.
liveType
==
FUSLiveTypeNone
)
{
return
;
}
NSTimeInterval
currentTime
=
NSDate
.
date
.
timeIntervalSince1970
;
if
(
currentTime
-
self
.
lastSocketReconnectRequestTime
<
2
.
0
)
{
return
;
}
self
.
lastSocketReconnectRequestTime
=
currentTime
;
[
FUSSwiftLiveHelper
.
shared
fus_requestReconnectRoomWithNeedResp
:
YES
];
}
// 结束主播
-
(
void
)
streamEnded
:
(
NSNotification
*
)
noti
{
FUSSocketMessageModel
*
messageModel
=
noti
.
object
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
6e958c87
...
...
@@ -2433,7 +2433,7 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
[[[[
FUSLiveHelper
shareInstance
]
liveVC
]
playView
]
fus_playWithUID
:
roomInfoModel
.
roomId
Url
:
roomInfoModel
.
publishUrl
];
}
self
.
autoStartPictureInPicture
=
[
[
NSUserDefaults
fus_readCurrentUserObjectWithKey
:
FUSUserUDKeys
.
fus_UD_KEY_OPEN_ROOM_MINIMIZE
]
boolValu
e
];
self
.
autoStartPictureInPicture
=
[
self
fus_shouldAutoStartPictureInPictur
e
];
}
else
{
// 如果是声音连麦房,要销毁播放器
[[[[
FUSLiveHelper
shareInstance
]
liveVC
]
playView
]
fus_stopWithUID
:
roomInfoModel
.
roomId
];
...
...
@@ -2936,8 +2936,23 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
}
-
(
void
)
setAutoStartPictureInPicture
:
(
BOOL
)
autoStartPictureInPicture
{
[
FUSLiveHelper
shareInstance
].
liveVC
.
autoStartPictureInPicture
=
autoStartPictureInPicture
;
_autoStartPictureInPicture
=
autoStartPictureInPicture
;
// 小窗总开关由后台统一控制,关闭时本地偏好不再生效。
BOOL
finalAutoStartPictureInPicture
=
[
self
fus_isSmallWindowFeatureEnabled
]
&&
autoStartPictureInPicture
;
[
FUSLiveHelper
shareInstance
].
liveVC
.
autoStartPictureInPicture
=
finalAutoStartPictureInPicture
;
_autoStartPictureInPicture
=
finalAutoStartPictureInPicture
;
}
/// 是否允许使用小窗能力,优先读取后台总开关。
-
(
BOOL
)
fus_isSmallWindowFeatureEnabled
{
return
[
FUSCacheDataShare
shareStore
].
settingInitDataModel
.
smallWindowSwitch
.
integerValue
==
1
;
}
/// 自动小窗最终状态:先看后台总开关,再看用户本地偏好。
-
(
BOOL
)
fus_shouldAutoStartPictureInPicture
{
if
(
!
[
self
fus_isSmallWindowFeatureEnabled
])
{
return
NO
;
}
return
[[
NSUserDefaults
fus_readCurrentUserObjectWithKey
:
FUSUserUDKeys
.
fus_UD_KEY_OPEN_ROOM_MINIMIZE
]
boolValue
];
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LiveSettingAlertView/FUSLiveAnchorSettingAlertView.m
View file @
6e958c87
...
...
@@ -114,7 +114,7 @@
__weak
typeof
(
self
)
weakSelf
=
self
;
if
(
@available
(
iOS
15
.
0
,
*
))
{
if
(
!
self
.
isAnchor
)
{
if
(
!
self
.
isAnchor
&&
[
self
fus_isSmallWindowFeatureEnabled
]
)
{
FUSLiveAnchorSettingModel
*
minimuze
=
[[
FUSLiveAnchorSettingModel
alloc
]
init
];
minimuze
.
title
=
[
NSString
fus_localString
:
@"自动小窗播放"
];
minimuze
.
subtitle
=
[
NSString
fus_localString
:
@"直播间内切换至App外时,保存直播间小窗播放"
];
...
...
@@ -221,8 +221,14 @@
[
view
fus_showWithAnimate
];
}
/// 小窗总开关由后台控制,关闭时不再展示本地设置项。
-
(
BOOL
)
fus_isSmallWindowFeatureEnabled
{
return
FUSCacheDataShare
.
shareStore
.
settingInitDataModel
.
smallWindowSwitch
.
integerValue
==
1
;
}
-
(
void
)
fus_showWithAnimate
{
self
.
interactionGameItem
.
switchState
=
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
stateSwitch
.
liveGameState
;
self
.
interactionGameItem
.
switchState
=
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
stateSwitch
.
liveGameState
;
self
.
bottomBgView
.
top
=
UIView
.
fus_screenH
;
self
.
alpha
=
0
.
0
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Controller/FUSNewsFeedDetailViewController.m
View file @
6e958c87
...
...
@@ -7,7 +7,6 @@
//
#import "FUSNewsFeedDetailViewController.h"
#import "FUSZoneTaskCenterViewController.h"
#import "FUSAuthFacePageOneViewController.h"
#import "FUSMyZoneViewController.h"
#import "FUSNewsFeedReplyView.h"
...
...
@@ -317,30 +316,8 @@
// 露水不足
if
(
code
==
-
116
)
{
NSMutableArray
*
otherBtns
=
[@[[
NSString
fus_localString
:
@"去买入"
]]
mutableCopy
];
BOOL
showTask
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSUserUDKeys
.
fus_TASK_SYSTEM_SHOW_SWITCH
]
boolValue
];
if
(
showTask
)
{
[
otherBtns
addObject
:[
NSString
fus_localString
:
@"任务获取"
]];
}
[
otherBtns
addObject
:[
NSString
fus_localString
:
@"取消"
]];
[
FUSAlertView
showAlertWithTitle
:[
NSString
fus_localString
:
@"露水不足"
]
message
:
nil
cancelButtonTitle
:
nil
otherButtonTitles
:
otherBtns
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
0
)
{
FUSHalfWebViewModel
*
halfWebModel
=
[[
FUSHalfWebViewModel
alloc
]
init
];
halfWebModel
.
popupType
=
FUSHalfWebViewPopupTypeHalfWeb
;
halfWebModel
.
url
=
FUSCacheDataShare
.
shareStore
.
settingInitDataModel
.
fusiConfig
.
dewHalfAddress
;
halfWebModel
.
clickBlank
=
YES
;
halfWebModel
.
transparency
=
YES
;
halfWebModel
.
heightR
=
@
(
82
).
stringValue
;
[
FUSRouter
.
liveRouter
fus_showHalfWebViewWithModel
:
halfWebModel
needMouted
:
NO
allowScroll
:
YES
userInteractionEnabled
:
YES
];
}
else
if
(
buttonIndex
==
1
)
{
FUSZoneTaskCenterViewController
*
taskCenterVC
=
[[
FUSZoneTaskCenterViewController
alloc
]
init
];
[[
UIViewController
fus_topViewController
].
navigationController
pushViewController
:
taskCenterVC
animated
:
YES
];
}
}];
// 复用动态模块统一的露水不足处理,避免当前场景半屏 H5 无法正常打开购买页。
[
FUSNewsFeedDataHelper
fus_showDewNoEnoughAlert
];
}
else
if
(
code
==
-
100
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"宝石不足"
]];
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Other/FUSNewsFeedDataHelper.h
View file @
6e958c87
...
...
@@ -53,6 +53,9 @@ NS_ASSUME_NONNULL_BEGIN
commentModel
:(
FUSNewsFeedCommentModel
*
__nullable
)
commentModel
updateUIHandler
:(
void
(
^
)(
BOOL
loadFinish
,
BOOL
succeed
,
BOOL
alertCancel
))
updateUIHandler
;
/// 展示露水不足弹窗,并处理去买入与任务获取跳转
+
(
void
)
fus_showDewNoEnoughAlert
;
/// 刷新列表。重新加载第一页
/// @param completeHandler 成功回调
/// @param failedHandler 失败回调
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Views/FUSNewsFeedCommentView.m
View file @
6e958c87
...
...
@@ -509,6 +509,7 @@
-
(
UIImageView
*
)
richImageView
{
if
(
!
_richImageView
)
{
_richImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
28
,
14
)];
_richImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
}
return
_richImageView
;
}
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/NewsFeed/Views/FUSNewsFeedReplyListHeaderView.m
View file @
6e958c87
...
...
@@ -285,6 +285,7 @@
-
(
UIImageView
*
)
richImageView
{
if
(
!
_richImageView
)
{
_richImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
28
,
14
)];
_richImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
}
return
_richImageView
;
}
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/LiveSetting/FUSLiveAudienceSettingViewController.m
View file @
6e958c87
...
...
@@ -126,7 +126,15 @@
[
FUSCacheDataShare
shareStore
].
quickChatShowState
=
item
.
switchState
;
};
group
.
items
=
@[
/*_hiddinSettingItem,*/
_minimizeItem
,
quickChatItem
,
carAudioItem
];
NSMutableArray
<
FUSCustomSettingItem
*>
*
items
=
[
NSMutableArray
array
];
// 小窗总开关关闭时,不再向用户暴露本地开关入口。
if
([
self
fus_isSmallWindowFeatureEnabled
])
{
[
items
addObject
:
_minimizeItem
];
}
[
items
addObject
:
quickChatItem
];
[
items
addObject
:
carAudioItem
];
group
.
items
=
items
.
copy
;
[
self
.
tableView
.
allGroups
appendObject
:
group
];
[
self
.
tableView
reloadData
];
...
...
@@ -180,7 +188,7 @@
[
FUSSettingHttpRequest
fus_getControlConfigState
:
^
(
BOOL
hasOpenedVirtual
,
BOOL
hasOpenedLocat
,
BOOL
hasOpenedStranger
,
BOOL
hasOpenHiddingInRoom
,
BOOL
minimizeState
,
CGFloat
micTakeDivide
,
NSInteger
liveState
)
{
self
.
hiddinSettingItem
.
switchState
=
hasOpenHiddingInRoom
;
self
.
minimizeItem
.
switchState
=
minimizeState
;
self
.
minimizeItem
.
switchState
=
[
self
fus_isSmallWindowFeatureEnabled
]
?
minimizeState
:
NO
;
[
self
.
tableView
reloadData
];
...
...
@@ -191,4 +199,9 @@
}];
}
/// 后台总开关开启后,用户本地小窗偏好才允许生效。
-
(
BOOL
)
fus_isSmallWindowFeatureEnabled
{
return
[
FUSCacheDataShare
shareStore
].
settingInitDataModel
.
smallWindowSwitch
.
integerValue
==
1
;
}
@end
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