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
6e9aadd8
authored
Feb 05, 2026
by
ludi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初步完成ffpkhelper对接
parent
cf41be93
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
307 additions
and
339 deletions
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolSubView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LinkMicro/View/FUSLinkMicroUserListView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/Other/FUSPKHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainResultView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainResultView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainTopView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainTopView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSPKStyleView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSPKStyleView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSRandomActivityPKView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSRandomActivityPKView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/WarningView/FUSRoomFirstChargeAlertView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Router/FUSShowRoomRouter.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.h
View file @
6e9aadd8
...
...
@@ -243,10 +243,6 @@ NS_ASSUME_NONNULL_BEGIN
// 改变PK按钮状态
+
(
NSString
*
)
fus_FUS_LIVE_ROOM_CHANGE_PKBTN_STATUS
;
// PK状态改变
+
(
NSString
*
)
fus_FUS_LIVE_ROOM_PK_STATUS
;
+
(
NSString
*
)
fus_FUS_REFRESH_ONLINEMIC
;
+
(
NSString
*
)
fus_FUS_CLEAN_MICDATA
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.m
View file @
6e9aadd8
...
...
@@ -397,12 +397,6 @@
return
@"FUS_LIVE_ROOM_CHANGE_PKBTN_STATUS"
;
}
// PK状态改变
+
(
NSString
*
)
fus_FUS_LIVE_ROOM_PK_STATUS
{
return
@"FUS_LIVE_ROOM_PK_STATUS"
;
}
+
(
NSString
*
)
fus_FUS_REFRESH_ONLINEMIC
{
return
@"FUS_REFRESH_ONLINEMIC"
;
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.h
View file @
6e9aadd8
...
...
@@ -21,7 +21,9 @@ typedef enum : NSUInteger {
liveLoadingDismiss
,
liveLoadingEntering
,
liveLoadingPause
,
liveLoadingBuffering
liveLoadingBuffering
,
liveLoadingOBSInterupt
,
// OBS 推流中断
liveLoadingPushReconnecting
,
// 推流重连中
}
LiveLoadingType
;
@interface
FUSLiveMainViewController
:
FUSBaseViewController
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
View file @
6e9aadd8
...
...
@@ -332,7 +332,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
if
([
FUSLiveHelper
shareInstance
].
streamModel
.
isPauseLive
&&
weakSelf
.
liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLive
StateNone
)
{
&&
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPK
StateNone
)
{
[
weakSelf
fus_showLiveLoadingViewWithType
:
liveLoadingPause
];
}
else
{
FUSLogInfo
(
@"pierce:AFNetworkReachabilityStatusReachableViaWWAN"
);
...
...
@@ -373,7 +373,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
return
;
}
if
([
FUSLiveHelper
shareInstance
].
streamModel
.
isPauseLive
&&
_liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLive
StateNone
)
{
&&
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPK
StateNone
)
{
[
weakSelf
fus_showLiveLoadingViewWithType
:
liveLoadingPause
];
}
else
{
FUSLogInfo
(
@"pierce:AFNetworkReachabilityStatusReachableViaWiFi"
);
...
...
@@ -719,15 +719,19 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
if
(
pkInfo
.
integerValue
==
1
)
{
//在pk中
// 审核下不显示PK
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
return
;
[
FUSLiveHttpHelper
fus_getRoomPKInfoWithRoomId
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
success
:
^
(
NSString
*
status
,
NSString
*
remainTime
,
NSString
*
winner
,
NSString
*
content
,
NSString
*
isLikePk
,
NSArray
<
FUSPKRoomPKInfoModel
*>
*
userlistArray
,
NSString
*
matchId
)
{
if
(
!
[
roomInfoModel
.
roomId
isEqualToString
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
])
{
FUSLogInfo
(
@"不是当前包房"
);
return
;
}
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_setupContentViewWithStatus
:
status
remainTime
:
remainTime
winner
:
winner
content
:
content
userlistArray
:
userlistArray
isShowEntrance
:
YES
];
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
FUSLogInfo
(
@"@%"
,
msg
);
}];
// [FUSLiveHttpHelper fus_getRoomPKInfoWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId success:^(NSString *status, NSString *remainTime, NSString *winner, NSString *content,NSString *isLikePk,NSArray<FUSPKRoomPKInfoModel *> *userlistArray,NSString *matchId) {
// if (![roomInfoModel.roomId isEqualToString:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) {
// FUSLogInfo(@"不是当前包房");
// return ;
// }
// [[FUSLiveHelper shareInstance].currentFunctionView fus_setupContentViewWithStatus:status remainTime:remainTime winner:winner content:content userlistArray:userlistArray isShowEntrance:YES];
// } failure:^(NSString *msg, int code) {
// FUSLogInfo(@"@%",msg);
// }];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
FUSSwiftLiveHelper
.
shared
.
pkHelper
getRoomPKInfoWithRoomId
:
FUSSwiftLiveHelper
.
shared
.
roomInfoModel
.
roomId
reconnect
:
1
];
});
}
...
...
@@ -800,7 +804,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
MJWeakSelf
[
FUSLiveHttpHelper
fus_requestEndLiveWithRoomId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
channelId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
channelId
]
succeed
:^
(
NSDictionary
*
dataDict
)
{
[
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_removeAllNotification
];
[
FUSSwiftLiveHelper
.
shared
.
pkHelper
ff_removeAndCleanHelper
];
[
weakSelf
initLiveEndViewWithInfoDict
:
dataDict
];
}
failure
:^
(
NSString
*
msg
,
NSInteger
code
)
{
[
FUSDialogView
fus_showDialog
:
msg
];
...
...
@@ -829,7 +833,8 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
// 直播端
[
FUSLiveHttpHelper
fus_requestEndLiveWithRoomId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
channelId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
channelId
]
succeed
:^
(
NSDictionary
*
dataDict
)
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_removeAllNotification
];
// [[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_removeAllNotification];
[
FUSSwiftLiveHelper
.
shared
.
pkHelper
ff_removeAndCleanHelper
];
[
weakSelf
initLiveEndViewWithInfoDict
:
dataDict
];
[
FUSLiveHelper
shareInstance
].
roomInfoModel
=
nil
;
[
FUSLiveHelper
shareInstance
].
liveType
=
FUSLiveTypeNone
;
...
...
@@ -845,7 +850,8 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}];
}
else
{
[
FUSLiveHttpHelper
fus_exitRoomWithRoomId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
livingType
:
@"0"
vdoid
:
[[[
FUSLiveHelper
shareInstance
]
streamModel
]
vdoid
]
success
:^
(
NSDictionary
*
dataDict
)
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_removeAllNotification
];
// [[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_removeAllNotification];
[
FUSSwiftLiveHelper
.
shared
.
pkHelper
ff_removeAndCleanHelper
];
[
weakSelf
initLiveEndViewWithInfoDict
:
dataDict
];
[
FUSLiveHelper
shareInstance
].
roomInfoModel
=
nil
;
[
FUSLiveHelper
shareInstance
].
liveType
=
FUSLiveTypeNone
;
...
...
@@ -863,7 +869,8 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
}
else
{
[
FUSLiveHttpHelper
fus_exitLinkMicRoomWithFid
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
vdoid
:[[[
FUSLiveHelper
shareInstance
]
streamModel
]
vdoid
]
success
:^
(
NSDictionary
*
dataDict
)
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_removeAllNotification
];
// [[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_removeAllNotification];
[
FUSSwiftLiveHelper
.
shared
.
pkHelper
ff_removeAndCleanHelper
];
[
FUSLiveHelper
shareInstance
].
roomInfoModel
=
nil
;
[
self
fus_cleanEndView
];
...
...
@@ -997,7 +1004,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
//pk 状态下不显示单人直播时的暂停画面
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
!=
FUSPKLive
StateNone
)
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPK
StateNone
)
{
FUSLogInfo
(
@"pierce:fus_setupLiveStateIsPause"
);
[
self
fus_showLiveLoadingViewWithType
:
liveLoadingDismiss
];
_streamView
.
playView
.
hidden
=
NO
;
...
...
@@ -1009,7 +1016,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
dict
[
@"roomid"
]
=
[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
kStreamPKPlayViewLiveStateNotification
object
:
dict
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FFPKNotification
.
playViewDidChanged
object
:
dict
];
return
;
}
...
...
@@ -1018,7 +1025,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
_streamView
.
playView
.
hidden
=
isPause
;
if
(
isPause
)
{
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLive
StateNone
)
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
==
FFPK
StateNone
)
{
[
self
fus_showLiveLoadingViewWithType
:
liveLoadingPause
];
[
_backgroundImageView
fus_setWebImageWithSubURLString
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
...
...
@@ -1392,11 +1399,12 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
NSString
*
liveType
=
@"0"
;
[
FUSLiveHttpHelper
fus_exitRoomWithRoomId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
livingType
:
liveType
vdoid
:
[[[
FUSLiveHelper
shareInstance
]
streamModel
]
vdoid
]
success
:^
(
NSDictionary
*
dataDict
)
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_removeAllNotification
];
}
failure
:^
(
NSString
*
msg
,
int
code
,
NSDictionary
*
errorDict
)
{
}];
[
FUSSwiftLiveHelper
.
shared
fus_requestReconnectRoomWithNeedResp
:
YES
];
// [FUSLiveHttpHelper fus_exitRoomWithRoomId:[[[FUSLiveHelper shareInstance] roomInfoModel] roomId] livingType:liveType vdoid:[[[FUSLiveHelper shareInstance] streamModel] vdoid] success:^(NSDictionary *dataDict) {
// [[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_removeAllNotification];
// } failure:^(NSString *msg, int code, NSDictionary *errorDict) {
//
// }];
}
...
...
@@ -1456,8 +1464,8 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
// 添加ID
__block
UILabel
*
IDLabel
;
IDLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
UIView
.
fus_screenW
-
80
-
15
,
100
+
UIView
.
fus_SafeTop
+
20
,
80
,
20
)];
if
(
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
)
{
IDLabel
.
y
=
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
.
y
+
23
;
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPKStateNone
)
{
IDLabel
.
y
=
FUSStreamKitPKConfig
.
fus_pkViewYPosition
+
23
;
IDLabel
.
x
=
UIView
.
fus_screenW
-
80
-
5
;
}
IDLabel
.
font
=
[
UIFont
fus_themeFont
:
14
];
...
...
@@ -2014,7 +2022,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
*/
-
(
void
)
fus_reloadBgImageView
{
if
(
self
.
liveFunctionView
.
pkHelper
.
pkLiveState
!=
FUSPKLive
StateNone
)
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPK
StateNone
)
{
[
self
.
backgroundImageView
fus_setImageWithName
:
@"live_pk_background_image"
blur
:
NO
];
}
else
{
if
(
!
[
NSString
isNull
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
face
])
{
...
...
@@ -2088,10 +2096,10 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
//这里的拉流失败只处理当前直播的状态,防止 PK 结束的流回调的影响
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLive
StateNone
&&
[[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
isEqualToString
:
uid
])
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
==
FFPK
StateNone
&&
[[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
isEqualToString
:
uid
])
{
// [self fus_setupLiveStateIsPause:YES];
[
self
fus_showLiveLoadingViewWithType
:
liveLoadingBuffering
];
}
else
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
!=
FUSPKLive
StateNone
)
{
}
else
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPK
StateNone
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
kStreamPlayViewDidLoadingPlayNotification
object
:
dict
];
}
}
...
...
@@ -2107,10 +2115,13 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
_streamView
.
playView
.
hidden
=
NO
;
[
self
fus_dismissLoadingView
];
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLiveStateNone
&&
[
FUSLiveHelper
shareInstance
].
streamModel
.
isPauseLive
)
{
[
self
fus_setupLiveStateIsPause
:
YES
];
}
else
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLiveStateNone
){
[
self
fus_setupLiveStateIsPause
:
NO
];
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
==
FFPKStateNone
)
{
if
([
FUSLiveHelper
shareInstance
].
streamModel
.
isPauseLive
)
{
[
self
fus_setupLiveStateIsPause
:
YES
];
}
else
{
[
self
fus_setupLiveStateIsPause
:
NO
];
}
}
}
...
...
@@ -2127,7 +2138,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
dict
=
((
NSNotification
*
)
dict
).
object
;
}
if
(
_liveFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLive
StateNone
)
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
==
FFPK
StateNone
)
{
if
(
!
[
NSDictionary
isNull
:
dict
])
{
// 只有当前直播间才响应
...
...
@@ -2257,7 +2268,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
case
liveLoadingBuffering
:
FUSLogInfo
(
@"pierce:liveLoadingBuffering"
);
if
(
!
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
)
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
==
FFPKStateNone
)
{
[
_liveLoadingView
fus_showLiveStreamLoading
];
}
break
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
6e9aadd8
...
...
@@ -666,12 +666,11 @@
}
+
(
void
)
fus_setPKUser
:
(
NSString
*
)
uid
mute
:
(
BOOL
)
mute
{
// TODO: V57 需要完成这个
// if (FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeAnchor) {
// [FUSLiveHelper.shareInstance.liveVC.pushView fus_setPKUser:uid mute:mute];
// } else {
// [FFLiveHelper.shareInstance.liveVC.playView fus_setPKUser:uid mute:mute];
// }
if
(
FUSSwiftLiveHelper
.
shared
.
liveType
==
FUSLiveTypeAnchor
)
{
[
FUSLiveHelper
.
shareInstance
.
liveVC
.
pushView
fus_setPKUser
:
uid
mute
:
mute
];
}
else
{
[
FUSLiveHelper
.
shareInstance
.
liveVC
.
playView
fus_setPKUser
:
uid
mute
:
mute
];
}
}
/**
...
...
@@ -1395,17 +1394,18 @@
if
(
pkInfo
.
integerValue
==
1
)
{
//在pk中
// 审核下不显示PK
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
return
;
[
FUSLiveHttpHelper
fus_getRoomPKInfoWithRoomId
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
success
:
^
(
NSString
*
status
,
NSString
*
remainTime
,
NSString
*
winner
,
NSString
*
content
,
NSString
*
isLikePk
,
NSArray
<
FUSPKRoomPKInfoModel
*>
*
userlistArray
,
NSString
*
matchId
)
{
if
(
!
[
roomInfoModel
.
roomId
isEqualToString
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
])
{
FUSLogInfo
(
@"不是当前包房"
);
return
;
}
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_setupContentViewWithStatus
:
status
remainTime
:
remainTime
winner
:
winner
content
:
content
userlistArray
:
userlistArray
isShowEntrance
:
YES
];
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
FUSLogInfo
(
@"@%"
,
msg
);
}];
[
FUSSwiftLiveHelper
.
shared
.
pkHelper
getRoomPKInfoWithRoomId
:
FUSSwiftLiveHelper
.
shared
.
roomInfoModel
.
roomId
reconnect
:
0
];
// [FUSLiveHttpHelper fus_getRoomPKInfoWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId success:^(NSString *status, NSString *remainTime, NSString *winner, NSString *content,NSString *isLikePk,NSArray<FUSPKRoomPKInfoModel *> *userlistArray,NSString *matchId) {
//
// if (![roomInfoModel.roomId isEqualToString:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) {
// FUSLogInfo(@"不是当前包房");
// return ;
// }
//
// [[FUSLiveHelper shareInstance].currentFunctionView fus_setupContentViewWithStatus:status remainTime:remainTime winner:winner content:content userlistArray:userlistArray isShowEntrance:YES];
// } failure:^(NSString *msg, int code) {
// FUSLogInfo(@"@%",msg);
// }];
}
[
FUSLiveHelper
shareInstance
].
streamModel
.
url
=
streamUrl
;
...
...
@@ -1427,7 +1427,8 @@
// [[FUSLiveGiftView shareGiftView] fus_requestGiftDataWithType:ReadDatabaseBegin success:nil failure:nil];
[[
FUSLiveHelper
shareInstance
].
liveVC
.
playView
fus_setVideoframeCallBackOpen
:
self
.
autoStartPictureInPicture
forUid
:[
FUSLiveHelper
shareInstance
].
liveVC
.
playView
.
mainUID
];
if
(
roomInfoModel
.
livestate
.
intValue
==
1
)
{
// byteRTC不暂停播放
if
(
roomInfoModel
.
livestate
.
intValue
==
1
&&
weakSelf
.
rtcType
.
integerValue
==
1
)
{
FUSLogDebug
(
@"FUSStreamPlayView==== 暂停1"
);
[
weakSelf
.
liveVC
fus_setupLiveStateIsPause
:
YES
];
FUSLogDebug
(
@"FUSStreamPlayView==== 暂停2"
);
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
6e9aadd8
...
...
@@ -687,16 +687,16 @@ NS_ASSUME_NONNULL_BEGIN
*/
+
(
void
)
fus_requestCharacterHyperlinkData
;
/**
获取pk房间信息
@param roomId 房间号
@param success 成功回调
@param failure 失败回调
*/
+
(
void
)
fus_getRoomPKInfoWithRoomId
:(
NSString
*
)
roomId
success
:(
void
(
^
)(
NSString
*
status
,
NSString
*
remainTime
,
NSString
*
winner
,
NSString
*
content
,
NSString
*
isLikePk
,
NSArray
<
FUSPKRoomPKInfoModel
*>*
userlistArray
,
NSString
*
matchId
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
;
/
//
**
//
获取pk房间信息
//
//
@param roomId 房间号
//
@param success 成功回调
//
@param failure 失败回调
//
*/
//
+ (void)fus_getRoomPKInfoWithRoomId:(NSString *)roomId
//
success:(void(^)(NSString *status,NSString *remainTime, NSString *winner,NSString *content,NSString *isLikePk,NSArray <FUSPKRoomPKInfoModel *>*userlistArray, NSString *matchId))success
//
failure:(void(^)(NSString *msg, int code))failure;
/// 引流数据统计
/// @param toRoomId 所在直播间
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
6e9aadd8
...
...
@@ -2131,51 +2131,51 @@
}
/**
获取pk房间信息
@param roomId 房间号
@param success 成功回调
@param failure 失败回调
*/
+
(
void
)
fus_getRoomPKInfoWithRoomId
:
(
NSString
*
)
roomId
success
:
(
void
(
^
)(
NSString
*
status
,
NSString
*
remainTime
,
NSString
*
winner
,
NSString
*
content
,
NSString
*
isLikePk
,
NSArray
<
FUSPKRoomPKInfoModel
*>*
userlistArray
,
NSString
*
matchId
))
success
failure
:
(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
{
if
([
NSString
isNull
:
roomId
])
{
FUSLogInfo
(
@"PK房间信息参数为空"
);
return
;
}
NSDictionary
*
params
=
@{
@"roomid"
:
roomId
};
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_LIVE_PK_ROOM_PK_INFO
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
NSDictionary
*
dict
=
dataDict
[
@"data"
];
NSString
*
status
=
dict
[
@"status"
];
NSString
*
remaintime
=
dict
[
@"remaintime"
];
NSArray
*
userlist
=
dict
[
@"userlist"
];
NSString
*
winner
=
dict
[
@"winner"
];
NSString
*
content
=
dict
[
@"content"
];
NSString
*
isLikePk
=
dict
[
@"isLikePk"
];
NSString
*
matchId
=
[
dict
[
@"matchid"
]
description
];
NSInteger
winTotal
=
[
dict
[
@"winTotal"
]
integerValue
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:[
isLikePk
description
]
forKey
:
FUSLiveUDKeys
.
fus_PK_IS_FOCUS_OPPOSITE_ANCHOR
];
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
.
matchId
=
matchId
;
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
.
winTotal
=
winTotal
;
NSMutableArray
*
userMutArray
=
[
NSMutableArray
arrayWithCapacity
:
userlist
.
count
];
for
(
NSDictionary
*
userDict
in
userlist
)
{
FUSPKRoomPKInfoModel
*
roomPKInfoModel
=
[
FUSPKRoomPKInfoModel
fus_modelWithDict
:
userDict
];
[
userMutArray
addObject
:
roomPKInfoModel
];
}
if
(
success
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
success
(
status
,
remaintime
,
winner
,
content
,
isLikePk
,
userMutArray
,
matchId
);
});
}
}
failure
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
if
(
failure
)
{
failure
(
FAILURE_MESSAGE
,
code
);
}
}];
}
/
//
**
//
获取pk房间信息
//
//
@param roomId 房间号
//
@param success 成功回调
//
@param failure 失败回调
//
*/
//
+ (void)fus_getRoomPKInfoWithRoomId:(NSString *)roomId
//
success:(void(^)(NSString *status,NSString *remainTime, NSString *winner,NSString *content,NSString *isLikePk,NSArray <FUSPKRoomPKInfoModel *>*userlistArray,NSString *matchId))success
//
failure:(void(^)(NSString *msg, int code))failure {
//
if ([NSString isNull:roomId]) {
//
FUSLogInfo(@"PK房间信息参数为空");
//
return;
//
}
//
NSDictionary *params = @{@"roomid":roomId};
//
//
[FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_LIVE_PK_ROOM_PK_INFO params:params success:^(NSDictionary *dataDict, int code) {
//
NSDictionary *dict = dataDict[@"data"];
//
NSString *status = dict[@"status"];
//
NSString *remaintime = dict[@"remaintime"];
//
NSArray *userlist = dict[@"userlist"];
//
NSString *winner = dict[@"winner"];
//
NSString *content = dict[@"content"];
//
NSString *isLikePk = dict[@"isLikePk"];
//
NSString *matchId = [dict[@"matchid"] description];
//
NSInteger winTotal = [dict[@"winTotal"] integerValue];
//
[[NSUserDefaults standardUserDefaults] setObject:[isLikePk description] forKey:FUSLiveUDKeys.fus_PK_IS_FOCUS_OPPOSITE_ANCHOR];
//
[FUSLiveHelper shareInstance].currentFunctionView.pkHelper.matchId = matchId;
//
[FUSLiveHelper shareInstance].currentFunctionView.pkHelper.winTotal = winTotal;
//
NSMutableArray *userMutArray = [NSMutableArray arrayWithCapacity:userlist.count];
//
for (NSDictionary *userDict in userlist) {
//
FUSPKRoomPKInfoModel *roomPKInfoModel = [FUSPKRoomPKInfoModel fus_modelWithDict:userDict];
//
[userMutArray addObject:roomPKInfoModel];
//
}
//
if (success) {
//
dispatch_async(dispatch_get_main_queue(), ^{
//
success(status,remaintime,winner,content,isLikePk,userMutArray,matchId);
//
});
//
}
//
} failure:^(NSDictionary *dataDict, int code) {
//
if (failure) {
//
failure(FAILURE_MESSAGE, code);
//
}
//
}];
//
}
/// 直播间同步用户权益信息
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolSubView.m
View file @
6e9aadd8
...
...
@@ -279,8 +279,8 @@
// 添加ID
__block
UILabel
*
IDLabel
;
IDLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
UIView
.
fus_screenW
-
80
-
15
,
100
+
UIView
.
fus_SafeTop
+
20
,
80
,
20
)];
if
(
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
)
{
IDLabel
.
y
=
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
.
y
+
23
;
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPKStateNone
)
{
IDLabel
.
y
=
FUSStreamKitPKConfig
.
fus_pkViewYPosition
+
23
;
IDLabel
.
x
=
UIView
.
fus_screenW
-
80
-
5
;
}
IDLabel
.
font
=
[
UIFont
fus_themeFont
:
14
];
...
...
@@ -526,21 +526,34 @@
}
-
(
void
)
fus_updateToolView2Types
{
[
self
ffupdateToolView2TypesPKState
:
FUS
LiveHelper
.
shareInstance
.
currentFunctionView
.
pkHelper
.
pkLive
State
];
[
self
ffupdateToolView2TypesPKState
:
FUS
SwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPK
State
];
}
-
(
void
)
ffupdateToolView2TypesPKState
:
(
F
USPKLive
State
)
pkState
{
-
(
void
)
ffupdateToolView2TypesPKState
:
(
F
FPK
State
)
pkState
{
NSMutableArray
*
toolTypesList
=
[[
NSMutableArray
alloc
]
init
];
if
(
FUSLiveHelper
.
shareInstance
.
liveRoomType
==
FUSRoomTypeLinkMic
)
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
)
/*,@(FUSLiveBottomToolTypeRoomScope), @(FUS
LiveBottomToolTypeNovaBuild)*/
]];
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
)
/*,@(FFLiveBottomToolTypeRoomScope), @(FF
LiveBottomToolTypeNovaBuild)*/
]];
}
else
{
if
(
FUSLiveHelper
.
shareInstance
.
roomScopeType
==
FUSLiveRoomScopeTypePassword
)
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
/*@(FUSLiveBottomToolTypeRoomScope),@(FUSLiveBottomToolTypePK), @(FUSLiveBottomToolTypeNovaBuild)*/
]];
}
else
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
/*@(FUSLiveBottomToolTypeRoomScope),*/
@
(
FUSLiveBottomToolTypePK
)
/*, @(FUSLiveBottomToolTypeNovaBuild)*/
]];
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
/*@(FUSLiveBottomToolTypeRoomScope),@(FUSLiveBottomToolTypePK), @(FUSLiveBottomToolTypeNovaBuild)*/
]];
}
else
{
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
/*@(FUSLiveBottomToolTypeRoomScope),*/
@
(
FUSLiveBottomToolTypePK
)
/*, @(FUSLiveBottomToolTypeNovaBuild)*/
]];
}
// [toolTypesList appendObjects:@[@(FFLiveBottomToolTypeLiveSetting),@(FFLiveBottomToolTypeRoomSetting), @(FFLiveBottomToolTypeRoomScope),@(FFLiveBottomToolTypeBeautySticker), @(FFLiveBottomToolTypeNovaBuild)]];
}
// TODO: V57 需要完成这个
// 是主播或者场控
// BOOL isAnchorOrLiveControl = FFLiveHelper.shareInstance.liveType == FFLiveTypeAnchor
// || FFSwiftLiveHelper.shared.roomInfoModel.liveControl.boolValue
// || FFSwiftLiveHelper.shared.roomInfoModel.fansGroup.groupHead == 1;
// if (isAnchorOrLiveControl) {
// [toolTypesList appendObject:@(FFLiveBottomToolTypeLiveManage)];
// }
[
self
.
toolView2
showItemWithTypesWithToolTypes
:
toolTypesList
];
}
#pragma mark - 其他
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
View file @
6e9aadd8
...
...
@@ -424,26 +424,28 @@
-
(
void
)
fus_bottomToolViewDidClickPKBtn
:
(
FUSLiveBottomToolView
*
)
bottomToolView
livePkBtnState
:
(
FUSLiveChatToolPKBtnState
)
livePkBtnState
{
switch
(
livePkBtnState
)
{
case
FUSLiveChatToolPKBtnStateStart
:
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_showPKStyleViewWithLivePkBtnState
:
FUSLivePKBtnStateStartPK
];
break
;
case
FUSLiveChatToolPKBtnStateCancel
:
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_showPKStyleViewWithLivePkBtnState
:
FUSLivePKBtnStateStartPK
];
break
;
case
FUSLiveChatToolPKBtnStateStop
:
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_showPKStyleViewWithLivePkBtnState
:
FUSLivePKBtnStateStartPK
];
break
;
case
FUSLiveChatToolPKBtnStateTimeOver
:
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"PK匹配失败,请稍后再试"
]];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_dismissPKStyleViewAnimated
:
YES
];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_cancelPKWithType
:[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
.
pkType
];
}
break
;
default
:
break
;
}
// switch (livePkBtnState) {
// case FUSLiveChatToolPKBtnStateStart:
// [[FUSLiveHelper shareInstance].currentFunctionView fus_showPKStyleViewWithLivePkBtnState:FUSLivePKBtnStateStartPK];
// break;
// case FUSLiveChatToolPKBtnStateCancel:
// [[FUSLiveHelper shareInstance].currentFunctionView fus_showPKStyleViewWithLivePkBtnState:FUSLivePKBtnStateStartPK];
// break;
// case FUSLiveChatToolPKBtnStateStop:
// [[FUSLiveHelper shareInstance].currentFunctionView fus_showPKStyleViewWithLivePkBtnState:FUSLivePKBtnStateStartPK];
// break;
// case FUSLiveChatToolPKBtnStateTimeOver:
// {
// [FUSDialogView fus_showDialog:[NSString fus_localString:@"PK匹配失败,请稍后再试"]];
// [[FUSLiveHelper shareInstance].currentFunctionView fus_dismissPKStyleViewAnimated:YES];
// [[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_cancelPKWithType:[FUSLiveHelper shareInstance].currentFunctionView.pkHelper.pkType];
// }
// break;
// default:
// break;
// }
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_showPKControlViewWithShowType
:
FFPKControlViewTypeBase
];
}
-
(
void
)
fus_bottomToolViewDidBeautySetting
:
(
FUSLiveBottomToolView
*
)
bottomToolView
beautyType
:
(
FUSLiveChatToolBeautyType
)
type
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputView.m
View file @
6e9aadd8
...
...
@@ -1029,8 +1029,8 @@
// 添加ID
__block
UILabel
*
IDLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
UIView
.
fus_screenW
-
80
-
15
,
100
+
UIView
.
fus_SafeTop
+
20
,
80
,
20
)];
if
(
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
)
{
IDLabel
.
y
=
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkContentView
.
y
+
23
;
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPKStateNone
)
{
IDLabel
.
y
=
FUSStreamKitPKConfig
.
fus_pkViewYPosition
+
23
;
IDLabel
.
x
=
UIView
.
fus_screenW
-
80
-
5
;
}
IDLabel
.
font
=
[
UIFont
fus_themeFont
:
14
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.h
View file @
6e9aadd8
...
...
@@ -9,9 +9,7 @@
#import <UIKit/UIKit.h>
#import "FUSRoomInfoModel.h"
#import "FUSLiveChatModel.h"
#import "FUSPKHelper.h"
#import "FUSPKStyleView.h"
#import "FUSPKMainView.h"
#import "FUSPKBottomUserHeaderView.h"
#import "FUSLiveChatTableView.h"
#import "FUSContentView.h"
...
...
@@ -88,10 +86,6 @@ typedef NS_ENUM(NSInteger, FUSFunctionMode) {
@end
@interface
FUSLiveFunctionView
:
UIView
// PK相关处理
@property
(
nonatomic
,
strong
)
FUSPKHelper
*
pkHelper
;
// PK内容View
@property
(
nonatomic
,
strong
)
FUSPKMainView
*
pkContentView
;
/**
聊天信息 TableView
...
...
@@ -330,68 +324,17 @@ typedef NS_ENUM(NSInteger, FUSFunctionMode) {
-
(
void
)
fus_showAllFunctionLayersWithAnimate
:(
BOOL
)
animate
;
#pragma mark -- PK
/**
创建观众端pkcontentView
@param status 当前的PK状态
@param remainTime 当前剩余时间
@param userlistArray 当前的主播信息和送礼信息
*/
-
(
void
)
fus_setupContentViewWithStatus
:(
NSString
*
)
status
remainTime
:(
NSString
*
)
remainTime
winner
:(
NSString
*
)
winner
content
:(
NSString
*
)
content
userlistArray
:(
NSArray
<
FUSPKRoomPKInfoModel
*>*
)
userlistArray
isShowEntrance
:(
BOOL
)
isShowEntrance
;
/// 自动根据pkhelper里的状态显示pk控制的view
-
(
void
)
fus_showPKControlViewWithShowType
:(
FFPKControlViewType
)
type
;
/**
根据状态显示PKStyleView
@param livePkBtnState PKbtn的状态
*/
-
(
void
)
fus_showPKStyleViewWithLivePkBtnState
:(
FUSLivePKBtnState
)
livePkBtnState
;
/**
根据服务器返回的状态停止PK
@param livePkBtnState pk状态
*/
-
(
void
)
fus_stopPKMatchingAccordingServerData
:(
FUSPKLiveState
)
livePkBtnState
PKId
:(
NSString
*
)
pkId
matchId
:(
NSString
*
)
matchId
;
/**
消失pkstyleView
@param animated 是否动画
*/
-
(
void
)
fus_dismissPKStyleViewAnimated
:(
BOOL
)
animated
;
/**
改变PK按钮的状态
@param livePKBtnState 按钮状态枚举
*/
-
(
void
)
fus_changeLivePKBtnState
:(
FUSLivePKBtnState
)
livePKBtnState
;
/**
显示styleview默认的 view
*/
-
(
void
)
fus_showStyleViewWithHomeViewDefaultShowType
:(
FUSPKHomeViewDefaultShowType
)
homeViewDefaultShowType
;
/**
开启pk匹配计时器
*/
-
(
void
)
fus_startPKMatchingTimer
:(
NSString
*
)
timeout
;
/**
停止pk匹配计时器
*/
-
(
void
)
fus_stopPKMatchingTimer
;
/**
收到对方整个直播拒绝邀请PK
*/
-
(
void
)
fus_receiveRemoteRefusePKWholeLiveTimeWithUid
:(
NSString
*
)
uid
;
/// 清除所有半屏弹窗
-
(
void
)
fus_clearHalfWebView
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
View file @
6e9aadd8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LinkMicro/View/FUSLinkMicroUserListView.m
View file @
6e9aadd8
...
...
@@ -264,8 +264,6 @@
#pragma - 声网
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
receiveUserLinkMicRoleChange
:
)
name
:
kLiveLinkMicRoleDidChanged
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_refreshLinkMicViewWithPKState
:
)
name
:
FUSLiveNotificationKeys
.
fus_FUS_LIVE_ROOM_PK_STATUS
object
:
nil
];
// 接收到即将连接视讯声讯,通知停止连麦
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_stopLinkMic
)
name
:
FUSChatNotificationKeys
.
fus_CHAT_READY_CONNECT_VOICE
object
:
nil
];
...
...
@@ -787,17 +785,6 @@
}
}
-
(
void
)
fus_refreshLinkMicViewWithPKState
:
(
NSNotification
*
)
noti
{
FUSPKLiveState
pkState
=
(
FUSPKLiveState
)[
noti
.
object
integerValue
];
if
(
pkState
==
FUSPKLiveStateNone
)
{
self
.
hidden
=
NO
;
}
else
{
self
.
hidden
=
YES
;
self
.
selfCloseMic
=
NO
;
}
}
-
(
void
)
enterForeground
:
(
NSNotification
*
)
noti
{
[
self
changeSelfMicStatus
:
YES
];
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/Other/FUSPKHelper.m
View file @
6e9aadd8
...
...
@@ -37,6 +37,7 @@ NSString * const kStreamPKPlayViewLiveStateNotification = @"kStreamPKPlayViewLiv
@end
@implementation
FUSPKHelper
#if 0
- (instancetype)init {
self = [super init];
if (self) {
...
...
@@ -1017,4 +1018,5 @@ NSString * const kStreamPKPlayViewLiveStateNotification = @"kStreamPKPlayViewLiv
FUSLogInfo(@"%@ dealloc",[self class]);
[self removeNotification];
}
#endif
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainResultView.h
View file @
6e9aadd8
...
...
@@ -6,6 +6,8 @@
// Copyright © 2024年 FusiYa. All rights reserved.
//
// TODO: V57 需要完成这个 废弃
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainResultView.m
View file @
6e9aadd8
...
...
@@ -84,7 +84,7 @@ NSInteger const kPKMainResultViewHeight = 150;
self
.
PKRightResultImageView
.
hidden
=
YES
;
self
.
winningStreakView
=
[[
FUSPkWinningStreakView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
48
,
42
)];
[
self
.
winningStreakView
fus_setNumber
:[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
.
winTotal
anim
:
NO
];
//
[self.winningStreakView fus_setNumber:[FUSLiveHelper shareInstance].currentFunctionView.pkHelper.winTotal anim:NO];
[
self
addSubview
:
self
.
winningStreakView
];
self
.
userInteractionEnabled
=
NO
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainTopView.h
View file @
6e9aadd8
...
...
@@ -5,6 +5,7 @@
// Created by 方磊 on 2019/4/2.
// Copyright © 2024年 FusiYa. All rights reserved.
//
// TODO: V57 需要完成这个 废弃
#import <UIKit/UIKit.h>
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainTopView.m
View file @
6e9aadd8
...
...
@@ -46,6 +46,7 @@ NSInteger const kPKMainTopViewHeight = 23;
@end
@implementation
FUSPKMainTopView
#if 0
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
...
...
@@ -429,4 +430,5 @@ NSInteger const kPKMainTopViewHeight = 23;
}
}
#endif
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainView.h
View file @
6e9aadd8
...
...
@@ -6,6 +6,8 @@
// Copyright © 2024年 FusiYa. All rights reserved.
//
// TODO: V57 需要完成这个 废弃
#import <UIKit/UIKit.h>
#import "FUSPKMainTopView.h"
#import "FUSPKMainResultView.h"
...
...
@@ -14,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
extern
NSInteger
const
kPKMainViewAdditionHeight
;
@class
FUSPKHelper
;
@class
FUSPKInfoModel
;
@class
FUSPKRoomPKInfoModel
;
@class
FUSPKNextStepModel
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKMainView/FUSPKMainView.m
View file @
6e9aadd8
...
...
@@ -60,6 +60,8 @@ NSInteger const kPKMainViewAdditionHeight = 51;
@implementation
FUSPKMainView
#if 0
/**
构造
...
...
@@ -1197,4 +1199,6 @@ NSInteger const kPKMainViewAdditionHeight = 51;
FUSLogInfo(@"===%@ delloc",[self class]);
}
#endif
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSPKStyleView.h
View file @
6e9aadd8
...
...
@@ -6,6 +6,8 @@
// Copyright © 2024年 FusiYa. All rights reserved.
//
// TODO: V57 需要完成这个 废弃
#import <UIKit/UIKit.h>
#import "FUSPKHttpHelper.h"
#import "FUSPKBtnStateModel.h"
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSPKStyleView.m
View file @
6e9aadd8
...
...
@@ -81,9 +81,9 @@ typedef NS_ENUM(NSUInteger, FUSPKStyleViewShowType) {
};
_homeView
.
homeViewCancelMatchingStateBlock
=
^
{
// 改变pk按钮状态
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_changeLivePKBtnState
:(
FUSLivePKBtnStateStartPK
)];
[
weakSelf
fus_removeTimer
];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_stopPKMatchingTimer
];
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:(FUSLivePKBtnStateStartPK)];
//
[weakSelf fus_removeTimer];
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_stopPKMatchingTimer];
};
[
self
addSubview
:
_homeView
];
}
...
...
@@ -261,98 +261,98 @@ typedef NS_ENUM(NSUInteger, FUSPKStyleViewShowType) {
*/
-
(
void
)
startInviteAnchorPKWithPKId
:
(
NSString
*
)
pkId
type
:
(
FUSPKType
)
type
nickName
:
(
NSString
*
)
nickName
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_invitePKWithPKid
:
pkId
type
:
type
status
:
@"1"
renew
:
@"0"
success
:^
(
NSString
*
renewStatus
,
NSString
*
nickName
)
{
NSLog
(
@"---===---Success"
);
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_dismissPKStyleViewAnimated
:
YES
];
if
(
renewStatus
.
integerValue
==
0
)
{
// 没有再次邀请
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"已发送邀请"
]];
// 改变pk按钮状态
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_changeLivePKBtnState
:(
FUSLivePKBtnStateCancelPK
)];
}
else
if
(
renewStatus
.
integerValue
==
1
)
{
// 再次邀请
[
FUSAlertView
showAlertWithTitle
:
@""
message
:[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"你已邀请了%@进行PK,继续将取消之前的邀请,是否确定发起邀请?"
],
nickName
]
cancelButtonTitle
:
[
NSString
fus_localString
:
@"取消"
]
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"确定"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
1
)
{
// 邀请
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_invitePKWithPKid
:
pkId
type
:
type
status
:
@"1"
renew
:
@"1"
success
:^
(
NSString
*
_Nonnull
renewStatus
,
NSString
*
_Nonnull
nickName
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"已发送邀请"
]];
// 改变pk按钮状态
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_changeLivePKBtnState
:(
FUSLivePKBtnStateCancelPK
)];
}
failure
:^
(
NSString
*
_Nonnull
msg
,
int
code
)
{
// 邀请失败 刷新数据
switch
(
code
)
{
case
-
5100
:
// 对方不接受任何人PK邀请
case
-
5102
:
//对方只接受好友PK邀请
case
-
5111
:
// 主播在这次的时间当中拒绝和您PK
case
-
5113
:
// 对方版本过低,无法接受邀请
{
[
self
.
PKAnchorListView
refreshClickedItemWithStatus
:
@"1"
];
}
break
;
case
-
5101
:
//对方正在PK中,请稍后再邀请
{
[
self
.
PKAnchorListView
refreshClickedItemWithStatus
:
@"2"
];
}
break
;
case
-
5112
:
//对方结束直播
{
[
self
.
PKAnchorListView
removeClickedItem
];
}
break
;
default
:
break
;
}
[
FUSDialogView
fus_showDialog
:
msg
];
}];
}
}];
}
}
failure
:^
(
NSString
*
_Nonnull
msg
,
int
code
)
{
NSLog
(
@"---===---Failure%@-%d"
,
msg
,
code
);
// 邀请失败 刷新数据
switch
(
code
)
{
case
-
5100
:
// 对方不接受任何人PK邀请
case
-
5102
:
//对方只接受好友PK邀请
case
-
5111
:
// 主播在这次的时间当中拒绝和您PK
case
-
5113
:
// 对方版本过低,无法接受邀请
{
[
self
.
PKAnchorListView
refreshClickedItemWithStatus
:
@"1"
];
}
break
;
case
-
5101
:
//对方正在PK中,请稍后再邀请
{
[
self
.
PKAnchorListView
refreshClickedItemWithStatus
:
@"2"
];
}
break
;
case
-
5112
:
//对方结束直播
{
[
self
.
PKAnchorListView
removeClickedItem
];
}
break
;
default
:
break
;
}
[
FUSDialogView
fus_showDialog
:
msg
];
}];
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_invitePKWithPKid:pkId type:type status:@"1" renew:@"0" success:^(NSString *renewStatus, NSString *nickName) {
//
NSLog(@"---===---Success");
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_dismissPKStyleViewAnimated:YES];
//
if (renewStatus.integerValue == 0) { // 没有再次邀请
//
[FUSDialogView fus_showDialog:[NSString fus_localString:@"已发送邀请"]];
//
// 改变pk按钮状态
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:(FUSLivePKBtnStateCancelPK)];
//
}else if (renewStatus.integerValue == 1) { // 再次邀请
//
[FUSAlertView showAlertWithTitle:@"" message:[NSString stringWithFormat:[NSString fus_localString:@"你已邀请了%@进行PK,继续将取消之前的邀请,是否确定发起邀请?"],nickName] cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_localString:@"确定"]] clickBlock:^(NSInteger buttonIndex) {
//
if (buttonIndex == 1) { // 邀请
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_invitePKWithPKid:pkId type:type status:@"1" renew:@"1" success:^(NSString * _Nonnull renewStatus, NSString * _Nonnull nickName) {
//
[FUSDialogView fus_showDialog:[NSString fus_localString:@"已发送邀请"]];
//
// 改变pk按钮状态
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:(FUSLivePKBtnStateCancelPK)];
//
} failure:^(NSString * _Nonnull msg, int code) {
//
// 邀请失败 刷新数据
//
switch (code) {
//
case -5100: // 对方不接受任何人PK邀请
//
case -5102://对方只接受好友PK邀请
//
case -5111: // 主播在这次的时间当中拒绝和您PK
//
case -5113: // 对方版本过低,无法接受邀请
//
{
//
[self.PKAnchorListView refreshClickedItemWithStatus:@"1"];
//
}
//
break;
//
case -5101://对方正在PK中,请稍后再邀请
//
{
//
[self.PKAnchorListView refreshClickedItemWithStatus:@"2"];
//
}
//
break;
//
case -5112://对方结束直播
//
{
//
[self.PKAnchorListView removeClickedItem];
//
}
//
break;
//
default:
//
break;
//
}
//
[FUSDialogView fus_showDialog:msg];
//
}];
//
}
//
}];
//
}
//
} failure:^(NSString * _Nonnull msg, int code) {
//
NSLog(@"---===---Failure%@-%d",msg,code);
//
// 邀请失败 刷新数据
//
switch (code) {
//
case -5100: // 对方不接受任何人PK邀请
//
case -5102://对方只接受好友PK邀请
//
case -5111: // 主播在这次的时间当中拒绝和您PK
//
case -5113: // 对方版本过低,无法接受邀请
//
{
//
[self.PKAnchorListView refreshClickedItemWithStatus:@"1"];
//
}
//
break;
//
case -5101://对方正在PK中,请稍后再邀请
//
{
//
[self.PKAnchorListView refreshClickedItemWithStatus:@"2"];
//
}
//
break;
//
case -5112://对方结束直播
//
{
//
[self.PKAnchorListView removeClickedItem];
//
}
//
break;
//
default:
//
break;
//
}
//
[FUSDialogView fus_showDialog:msg];
//
}];
}
/**
开始全寨主播pk
*/
-
(
void
)
startPKAllAnchor
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_startPKWithType
:
FUSPKTypeAllAnchor
success
:
^
(
NSString
*
_Nonnull
timeout
)
{
[
self
fus_dismissWithAnimate
:
YES
];
}
failure
:^
(
NSString
*
_Nonnull
msg
,
int
code
)
{
[
FUSDialogView
fus_showDialog
:
msg
];
}];
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_startPKWithType:FUSPKTypeAllAnchor success:^(NSString * _Nonnull timeout) {
//
[self fus_dismissWithAnimate:YES];
//
} failure:^(NSString * _Nonnull msg, int code) {
//
[FUSDialogView fus_showDialog:msg];
//
}];
}
/**
开始活动pk
*/
-
(
void
)
startActivityPK
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_startPKWithType
:
FUSPKTypeActivity
success
:
^
(
NSString
*
_Nonnull
timeout
)
{
[
self
fus_dismissWithAnimate
:
YES
];
}
failure
:^
(
NSString
*
_Nonnull
msg
,
int
code
)
{
[
FUSDialogView
fus_showDialog
:
msg
];
}];
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_startPKWithType:FUSPKTypeActivity success:^(NSString * _Nonnull timeout) {
//
[self fus_dismissWithAnimate:YES];
//
} failure:^(NSString * _Nonnull msg, int code) {
//
[FUSDialogView fus_showDialog:msg];
//
}];
}
/**
...
...
@@ -665,9 +665,9 @@ typedef NS_ENUM(NSUInteger, FUSPKStyleViewShowType) {
}
else
{
height
=
305
;
}
if
([
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLiveStateConnectting
)
{
PKBtnStateModel
.
status
=
@"-1"
;
}
//
if ([FUSLiveHelper shareInstance].currentFunctionView.pkHelper.pkLiveState == FUSPKLiveStateConnectting) {
//
PKBtnStateModel.status = @"-1";
//
}
self
.
RandomActivityPKView
=
[
FUSRandomActivityPKView
RandomActivityPKView
];
self
.
RandomActivityPKView
.
frame
=
CGRectMake
(
0
,
self
.
height
,
self
.
width
,
height
);
self
.
RandomActivityPKView
.
title
=
PKBtnStateModel
.
curPkname
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSRandomActivityPKView.h
View file @
6e9aadd8
...
...
@@ -6,6 +6,8 @@
// Copyright © 2024年 FusiYa. All rights reserved.
//
// TODO: V57 需要完成这个 废弃,后续删除
#import <UIKit/UIKit.h>
#import "FUSPKStyleModel.h"
#import "FUSPKBtnStateModel.h"
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/View/PKPrepareView/FUSRandomActivityPKView.m
View file @
6e9aadd8
...
...
@@ -45,6 +45,7 @@
@end
@implementation
FUSRandomActivityPKView
#if 0
// 构造方法
+ (instancetype)RandomActivityPKView {
return [[[FUSShowRoomCenterBunble bundle] loadNibNamed:NSStringFromClass([FUSRandomActivityPKView class]) owner:self options:nil] firstObject];
...
...
@@ -116,7 +117,7 @@
} else if (self.PKBtnStateModel.status.integerValue == 2 || self.PKBtnStateModel.status.integerValue == 3 || self.PKBtnStateModel.status.integerValue == 4 || self.PKBtnStateModel.status.integerValue == 5 || self.PKBtnStateModel.status.integerValue == -1) {
// 结束PK
// [[FUSLiveHelper shareInstance].currentFunctionView fus_showPKStyleViewWithLivePkBtnState:FUSLivePKBtnStateStopPK];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_changeLivePKBtnState
:(
FUSLivePKBtnStateStartPK
)];
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:(FUSLivePKBtnStateStartPK)];
switch (self.PKBtnStateModel.status.integerValue) {
case -1:
[self fus_stopPKWithPKState:FUSPKLiveStateConnectting];
...
...
@@ -193,29 +194,29 @@
取消pk
*/
- (void)fus_cancelPK {
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_dismissPKStyleViewAnimated
:
YES
];
// 改变按钮状态
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_changeLivePKBtnState
:
FUSLivePKBtnStateStartPK
];
// 取消PKfus_cancelPKWithType
if
(
self
.
PKBtnStateModel
.
curType
.
integerValue
==
3
)
{
[
FUSTalkingData
fus_trackEvent
:
FUSLiveEventTrackParams
.
fus_EVENT_LIVEROOM_PK_CANCEL_PK
label
:
@""
parameters
:
@{
@"type"
:
@"randommatch"
}];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_stopPKMatchingTimer
];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_cancelPKWithType
:
FUSPKTypeAllAnchor
];
}
else
if
(
self
.
PKBtnStateModel
.
curType
.
integerValue
==
4
)
{
[
FUSTalkingData
fus_trackEvent
:
FUSLiveEventTrackParams
.
fus_EVENT_LIVEROOM_PK_CANCEL_PK
label
:
@""
parameters
:
@{
@"type"
:
@"activity"
}];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_stopPKMatchingTimer
];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_cancelPKWithType
:
FUSPKTypeActivity
];
}
else
if
(
self
.
PKBtnStateModel
.
curType
.
integerValue
==
1
)
{
}
else
if
(
self
.
PKBtnStateModel
.
curType
.
integerValue
==
2
)
{
[
FUSTalkingData
fus_trackEvent
:
FUSLiveEventTrackParams
.
fus_EVENT_LIVEROOM_PK_CANCEL_PK
label
:
@""
parameters
:
@{
@"type"
:
@"hotlist"
}];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_invitePKWithPKid
:
self
.
PKBtnStateModel
.
pkid
type
:
FUSPKTypeHotAnchor
status
:
@"2"
renew
:
@"0"
success
:^
(
NSString
*
_Nonnull
renewStatus
,
NSString
*
_Nonnull
nickName
)
{
// 改变pk按钮状态
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_changeLivePKBtnState
:(
FUSLivePKBtnStateStartPK
)];
}
failure
:^
(
NSString
*
_Nonnull
msg
,
int
code
)
{
}];
}
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_dismissPKStyleViewAnimated:YES];
//
// 改变按钮状态
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:FUSLivePKBtnStateStartPK];
//
// 取消PKfus_cancelPKWithType
//
if (self.PKBtnStateModel.curType.integerValue == 3) {
//
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_LIVEROOM_PK_CANCEL_PK label:@"" parameters:@{@"type":@"randommatch"}];
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_stopPKMatchingTimer];
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_cancelPKWithType:FUSPKTypeAllAnchor];
//
} else if (self.PKBtnStateModel.curType.integerValue == 4) {
//
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_LIVEROOM_PK_CANCEL_PK label:@"" parameters:@{@"type":@"activity"}];
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_stopPKMatchingTimer];
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_cancelPKWithType:FUSPKTypeActivity];
//
} else if (self.PKBtnStateModel.curType.integerValue == 1) {
//
//
} else if (self.PKBtnStateModel.curType.integerValue == 2) {
//
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_LIVEROOM_PK_CANCEL_PK label:@"" parameters:@{@"type":@"hotlist"}];
//
[[FUSLiveHelper shareInstance].currentFunctionView.pkHelper fus_invitePKWithPKid:self.PKBtnStateModel.pkid type:FUSPKTypeHotAnchor status:@"2" renew:@"0" success:^(NSString * _Nonnull renewStatus, NSString * _Nonnull nickName) {
//
// 改变pk按钮状态
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:(FUSLivePKBtnStateStartPK)];
//
} failure:^(NSString * _Nonnull msg, int code) {
//
//
}];
//
}
}
// 取消定时器
- (void)fus_cancelTimer {
...
...
@@ -236,7 +237,7 @@
} else if (self.PKBtnStateModel.curType.integerValue == 4) {
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_LIVEROOM_PK_CLOSE_PK label:@"" parameters:@{@"type":@"activity"}];
}
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_stopPKMatchingAccordingServerData
:
state
PKId
:
self
.
PKBtnStateModel
.
pkid
matchId
:
self
.
PKBtnStateModel
.
matchid
];
//
[[FUSLiveHelper shareInstance].currentFunctionView fus_stopPKMatchingAccordingServerData:state PKId:self.PKBtnStateModel.pkid matchId:self.PKBtnStateModel.matchid];
}
#pragma mark - 赋值
...
...
@@ -338,4 +339,5 @@
self.backBtn.hidden = NO;
}
}
#endif
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/WarningView/FUSRoomFirstChargeAlertView.m
View file @
6e9aadd8
...
...
@@ -13,6 +13,7 @@
#import "FUSPaymentManager.h"
#import "FUSRechargeViewController.h"
#import <FUSShowRoomModule/FUSShowRoomModule-Swift.h>
@interface
FUSRoomFirstChargeAlertView
()
...
...
@@ -85,7 +86,7 @@
/// 判断是否可以弹窗
+
(
BOOL
)
fus_canDailyShow
{
if
(
[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
.
pkLiveState
==
FUSPKLiveStatePK
)
{
if
(
FUSSwiftLiveHelper
.
shared
.
pkHelper
.
ocViewModel
.
currentPKState
!=
FFPKStateNone
)
{
return
NO
;
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
View file @
6e9aadd8
...
...
@@ -328,8 +328,8 @@ NS_ASSUME_NONNULL_BEGIN
+
(
NSString
*
)
fus_URL_Live_Popularity_Contribute_List
;
#pragma mark -- PK
// 房间PK信息
+
(
NSString
*
)
fus_URL_LIVE_PK_ROOM_PK_INFO
;
//
//
房间PK信息
//
+ (NSString *)fus_URL_LIVE_PK_ROOM_PK_INFO;
// PK信息
+
(
NSString
*
)
fus_URL_LIVE_PK_INFO
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
View file @
6e9aadd8
...
...
@@ -603,10 +603,10 @@
}
#pragma mark -- PK
// 房间PK信息
+
(
NSString
*
)
fus_URL_LIVE_PK_ROOM_PK_INFO
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/pk/roompkinfo.html"
];
}
//
//
房间PK信息
//
+ (NSString *)fus_URL_LIVE_PK_ROOM_PK_INFO {
//
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/pk/roompkinfo.html"];
//
}
// PK信息
+
(
NSString
*
)
fus_URL_LIVE_PK_INFO
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Router/FUSShowRoomRouter.m
View file @
6e9aadd8
...
...
@@ -601,7 +601,7 @@
NSString
*
liveType
=
@"0"
;
[
FUSLiveHttpHelper
fus_exitRoomWithRoomId
:[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
livingType
:
liveType
vdoid
:
[[[
FUSLiveHelper
shareInstance
]
streamModel
]
vdoid
]
success
:^
(
NSDictionary
*
dataDict
)
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
.
pkHelper
fus_removeAllNotification
];
[[
[
FUSSwiftLiveHelper
shared
]
pkHelper
]
ff_removeAndCleanHelper
];
}
failure
:^
(
NSString
*
msg
,
int
code
,
NSDictionary
*
errorDict
)
{
}];
...
...
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