Commit 8db6b419 by ludi

正在搞连麦,上传一下

parent d1ad68bd
Showing with 451 additions and 12 deletions
...@@ -81,6 +81,14 @@ public func isEmptyDict(_ dict: [AnyHashable: Any]?) -> Bool { ...@@ -81,6 +81,14 @@ public func isEmptyDict(_ dict: [AnyHashable: Any]?) -> Bool {
} }
return FUSConfig.sharedInstanced().pathConfigs.bigDownloadPath(self as String) as NSString return FUSConfig.sharedInstanced().pathConfigs.bigDownloadPath(self as String) as NSString
} }
/// 判断是否是纯数字
@objc public static func isNumericString(_ str: String?) -> Bool {
guard isValidString(str) else { return false }
let numericRegex = "^[0-9]+$"
let numericTest = NSPredicate(format: "SELF MATCHES %@", numericRegex)
return numericTest.evaluate(with: str)
}
} }
public extension String { public extension String {
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#define BYTE_DANCE_FILTER_RESOURCE_PATH [FUSConfig.sharedInstanced.pathConfigs downloadResourcePath:@"/BytedanceResource" pathMd5:@""]
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FUSStreamBeautyEffectModel : NSObject @interface FUSStreamBeautyEffectModel : NSObject
......
...@@ -71,6 +71,15 @@ typedef NS_ENUM(NSInteger, FFStreamCaptureSDKType) { ...@@ -71,6 +71,15 @@ typedef NS_ENUM(NSInteger, FFStreamCaptureSDKType) {
// PK主播端相互通讯的分辨率 // PK主播端相互通讯的分辨率
@property (nonatomic, assign) NSInteger agoraTargetBitrate; @property (nonatomic, assign) NSInteger agoraTargetBitrate;
@property (nonatomic, assign) NSInteger autobitratemode;
// 资源路径
@property (nonatomic, copy) NSString *bdurl;
/// 资源MD5
@property (nonatomic, copy) NSString *bdurlmd5;
@property (nonatomic, copy) NSString *licbag;
@property (nonatomic, copy) NSString *licbagmd5;
// 采集推流的SDK类型 // 采集推流的SDK类型
@property (nonatomic, assign) FFStreamCaptureSDKType captureSDKType; @property (nonatomic, assign) FFStreamCaptureSDKType captureSDKType;
......
...@@ -605,6 +605,9 @@ ...@@ -605,6 +605,9 @@
00E6CD912F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CD902F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.m */; }; 00E6CD912F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CD902F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.m */; };
00E6CD922F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 00E6CD8F2F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.h */; }; 00E6CD922F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 00E6CD8F2F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.h */; };
00E6CD9F2F556B0B00B63797 /* FUSVSGiftBombModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CD9E2F556B0B00B63797 /* FUSVSGiftBombModel.swift */; }; 00E6CD9F2F556B0B00B63797 /* FUSVSGiftBombModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CD9E2F556B0B00B63797 /* FUSVSGiftBombModel.swift */; };
00E6CDB82F5584BA00B63797 /* FFLinkMicDataHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CDB72F5584BA00B63797 /* FFLinkMicDataHelper.m */; };
00E6CDB92F5584BA00B63797 /* FFLinkMicDataHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 00E6CDB62F5584BA00B63797 /* FFLinkMicDataHelper.h */; };
00E6CDC02F5586AB00B63797 /* FUSLiveRoomSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E6CDBF2F5586AB00B63797 /* FUSLiveRoomSocket.swift */; };
3E261EA32F2C5F680008C0C0 /* FUSByteHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */; }; 3E261EA32F2C5F680008C0C0 /* FUSByteHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */; };
3E261EA42F2C5F680008C0C0 /* FUSByteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */; }; 3E261EA42F2C5F680008C0C0 /* FUSByteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */; };
3E261EA72F2C5FAB0008C0C0 /* FUSLinkMicMediator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */; }; 3E261EA72F2C5FAB0008C0C0 /* FUSLinkMicMediator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */; };
...@@ -2474,6 +2477,9 @@ ...@@ -2474,6 +2477,9 @@
00E6CD8F2F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveChatTableClickTypeRangeModel.h; sourceTree = "<group>"; }; 00E6CD8F2F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveChatTableClickTypeRangeModel.h; sourceTree = "<group>"; };
00E6CD902F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveChatTableClickTypeRangeModel.m; sourceTree = "<group>"; }; 00E6CD902F52FA3900B63797 /* FUSLiveChatTableClickTypeRangeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveChatTableClickTypeRangeModel.m; sourceTree = "<group>"; };
00E6CD9E2F556B0B00B63797 /* FUSVSGiftBombModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSVSGiftBombModel.swift; sourceTree = "<group>"; }; 00E6CD9E2F556B0B00B63797 /* FUSVSGiftBombModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSVSGiftBombModel.swift; sourceTree = "<group>"; };
00E6CDB62F5584BA00B63797 /* FFLinkMicDataHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FFLinkMicDataHelper.h; sourceTree = "<group>"; };
00E6CDB72F5584BA00B63797 /* FFLinkMicDataHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FFLinkMicDataHelper.m; sourceTree = "<group>"; };
00E6CDBF2F5586AB00B63797 /* FUSLiveRoomSocket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRoomSocket.swift; sourceTree = "<group>"; };
3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSByteHelper.h; sourceTree = "<group>"; }; 3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSByteHelper.h; sourceTree = "<group>"; };
3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSByteHelper.m; sourceTree = "<group>"; }; 3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSByteHelper.m; sourceTree = "<group>"; };
3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLinkMicMediator.h; sourceTree = "<group>"; }; 3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLinkMicMediator.h; sourceTree = "<group>"; };
...@@ -5063,6 +5069,7 @@ ...@@ -5063,6 +5069,7 @@
00E2A4752F1E2438003B779E /* FUSSwiftLiveHelper.swift */, 00E2A4752F1E2438003B779E /* FUSSwiftLiveHelper.swift */,
BED6558C2C5B745D00668116 /* FUSLiveHttpHelper.h */, BED6558C2C5B745D00668116 /* FUSLiveHttpHelper.h */,
BED6558D2C5B745D00668116 /* FUSLiveHttpHelper.m */, BED6558D2C5B745D00668116 /* FUSLiveHttpHelper.m */,
00E6CDBF2F5586AB00B63797 /* FUSLiveRoomSocket.swift */,
); );
path = Other; path = Other;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -5337,6 +5344,8 @@ ...@@ -5337,6 +5344,8 @@
BED656A62C5B745D00668116 /* FUSLinkMicroHttpHelper.m */, BED656A62C5B745D00668116 /* FUSLinkMicroHttpHelper.m */,
3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */, 3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */,
3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */, 3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */,
00E6CDB62F5584BA00B63797 /* FFLinkMicDataHelper.h */,
00E6CDB72F5584BA00B63797 /* FFLinkMicDataHelper.m */,
); );
path = Other; path = Other;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -7215,6 +7224,7 @@ ...@@ -7215,6 +7224,7 @@
BED659F62C5B745F00668116 /* FUSPKMainProgressBarView.h in Headers */, BED659F62C5B745F00668116 /* FUSPKMainProgressBarView.h in Headers */,
BE189E3D2C733B460008418B /* FSRRoommanagerdictPKView.h in Headers */, BE189E3D2C733B460008418B /* FSRRoommanagerdictPKView.h in Headers */,
BED65AA22C5B745F00668116 /* FUSAnchorListAutoPlayTableView.h in Headers */, BED65AA22C5B745F00668116 /* FUSAnchorListAutoPlayTableView.h in Headers */,
00E6CDB92F5584BA00B63797 /* FFLinkMicDataHelper.h in Headers */,
BE189E0D2C733B460008418B /* FSRBulletdictEffectView.h in Headers */, BE189E0D2C733B460008418B /* FSRBulletdictEffectView.h in Headers */,
00B28C972D2FBF290008476B /* FUSFansMemberModel.h in Headers */, 00B28C972D2FBF290008476B /* FUSFansMemberModel.h in Headers */,
BE189DF12C733B460008418B /* FSRGiftShowRoomRoomGuarderTableViewCell.h in Headers */, BE189DF12C733B460008418B /* FSRGiftShowRoomRoomGuarderTableViewCell.h in Headers */,
...@@ -8744,6 +8754,7 @@ ...@@ -8744,6 +8754,7 @@
BE189E162C733B460008418B /* FSREnterdictActiveMotorEffectView.m in Sources */, BE189E162C733B460008418B /* FSREnterdictActiveMotorEffectView.m in Sources */,
BED658FA2C5B745E00668116 /* FUSLiveChatFastInputView.m in Sources */, BED658FA2C5B745E00668116 /* FUSLiveChatFastInputView.m in Sources */,
BED65A6D2C5B745F00668116 /* FUSRoomGuideFoucsAndCardView.m in Sources */, BED65A6D2C5B745F00668116 /* FUSRoomGuideFoucsAndCardView.m in Sources */,
00E6CDC02F5586AB00B63797 /* FUSLiveRoomSocket.swift in Sources */,
BED65A6A2C5B745F00668116 /* FUSRoomGuideAnchorLikeNoticeView.m in Sources */, BED65A6A2C5B745F00668116 /* FUSRoomGuideAnchorLikeNoticeView.m in Sources */,
BED658DB2C5B745E00668116 /* FUSAudienceListView.m in Sources */, BED658DB2C5B745E00668116 /* FUSAudienceListView.m in Sources */,
BED65ABD2C5B745F00668116 /* FUSHomeNovaListCollectionView.m in Sources */, BED65ABD2C5B745F00668116 /* FUSHomeNovaListCollectionView.m in Sources */,
...@@ -8961,6 +8972,7 @@ ...@@ -8961,6 +8972,7 @@
00E2A4542F1E1614003B779E /* FFPKScoreProgressView.swift in Sources */, 00E2A4542F1E1614003B779E /* FFPKScoreProgressView.swift in Sources */,
00E2A4552F1E1614003B779E /* FFPKControlSubBaseView.swift in Sources */, 00E2A4552F1E1614003B779E /* FFPKControlSubBaseView.swift in Sources */,
00E2A4562F1E1614003B779E /* FFPushRTMStreamChangeDataCell.swift in Sources */, 00E2A4562F1E1614003B779E /* FFPushRTMStreamChangeDataCell.swift in Sources */,
00E6CDB82F5584BA00B63797 /* FFLinkMicDataHelper.m in Sources */,
00E2A4572F1E1614003B779E /* FFPKControlContributionBannerCell.swift in Sources */, 00E2A4572F1E1614003B779E /* FFPKControlContributionBannerCell.swift in Sources */,
00E2A4582F1E1614003B779E /* FFPushRTMStreamChangeDataAlertView.swift in Sources */, 00E2A4582F1E1614003B779E /* FFPushRTMStreamChangeDataAlertView.swift in Sources */,
00E2A4592F1E1614003B779E /* FFPKResultAnimation.swift in Sources */, 00E2A4592F1E1614003B779E /* FFPKResultAnimation.swift in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_connect_below_image@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_connect_below_image@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_connect_upon_image@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_connect_upon_image@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_giftViewBackpackButton_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_giftViewBackpackButton_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_hi_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_hi_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_liveFollow_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_liveFollow_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_liveGiftButton_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_liveGiftButton_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_pkLightUp_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_pkLightUp_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_pkLightUp_tapBtn@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_pkLightUp_tapBtn@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "user_guide_tips_quickChat_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "user_guide_tips_quickChat_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -361,6 +361,8 @@ typedef NS_ENUM(NSInteger,FUSLiveRoomScopeType) { ...@@ -361,6 +361,8 @@ typedef NS_ENUM(NSInteger,FUSLiveRoomScopeType) {
+ (void)fus_endPush; + (void)fus_endPush;
-(void)fus_initSteamView;
- (void)fus_showAudienceError; - (void)fus_showAudienceError;
/// 停止所有推流操作 /// 停止所有推流操作
......
//
// FUSLiveRoomSocket.swift
// FUSShowRoomModule
//
// Created by aaa on 2026/3/2.
//
import UIKit
@objc public class FUSLiveRoomSocket: NSObject {
@objc public static let linkMicSendInvite = "30001" // 主播发送连麦邀请
@objc public static let linkMicReplayInvite = "30002" // 用户回复连麦邀请
@objc public static let linkMicFail = "30003" // 连麦失败,终止连麦
@objc public static let linkMicEnd = "30004" // 结束连麦
@objc public static let linkMicReplyAsk = "30005" // 主播回复用户的申请连麦
@objc public static let linkMicSucceed = "30006" // 连麦成功
@objc public static let linkMicCancel = "30007" // 用户取消连麦申请
@objc public static let linkMicASK = "30008" // 用户发送连麦申请
@objc public static let linkMicClose = "30009" // 闭麦
@objc public static let linkMicOpen = "30010" // 开麦
@objc public static let linkMicDelete = "30011" // 移除连麦
@objc public static let linkMicChange = "30012" // 麦位列表存在变化
}
...@@ -586,6 +586,13 @@ ...@@ -586,6 +586,13 @@
} }
} }
if (sender.tag == FUSLiveBottomToolTypeAudienceMessage) {
[[FFUserGuideTipsHelper share] ff_dismissWithType:FFUserGuideTipsTypeLiveSendChat];
[[FFUserGuideTipsHelper share] ff_completeGuideWithType:FFUserGuideTipsTypeLiveSendChat];
[[FFUserGuideTipsHelper share] ff_dismissWithType:FFUserGuideTipsTypeLiveGiftButton];
[[FFUserGuideTipsHelper share] ff_dismissWithType:FFUserGuideTipsTypePkLightUp];
}
if (sender.tag == FUSLiveBottomToolTypeTool) { if (sender.tag == FUSLiveBottomToolTypeTool) {
[self fus_hideGiftMessageTipView]; [self fus_hideGiftMessageTipView];
} }
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
cell.hiIconImageView.image = [FUSShowRoomCenterBunble imageNamed:@"chat_textChain_share"]; cell.hiIconImageView.image = [FUSShowRoomCenterBunble imageNamed:@"chat_textChain_share"];
if (model.hyperlinkOrder == 100061) { if (model.hyperlinkOrder == 100061) {
cell.hiIconImageView.image = [FUSShowRoomCenterBunble versionImageNamed:@"user_guide_tips_hi_icon"]; cell.hiIconImageView.image = [FUSShowRoomCenterBunble imageNamed:@"user_guide_tips_hi_icon"];
} }
} }
cell.model = model; cell.model = model;
......
...@@ -317,21 +317,21 @@ extension FFUserGuideTipsHelper.FFUserGuideTipsType { ...@@ -317,21 +317,21 @@ extension FFUserGuideTipsHelper.FFUserGuideTipsType {
func ff_getIcon() -> UIImage? { func ff_getIcon() -> UIImage? {
switch self { switch self {
case .liveSendChat: case .liveSendChat:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_hi_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_hi_icon")
case .chatScreenButton: case .chatScreenButton:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_hi_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_hi_icon")
case .quickChat: case .quickChat:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_quickChat_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_quickChat_icon")
case .liveFollow: case .liveFollow:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_liveFollow_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_liveFollow_icon")
case .liveGiftButton: case .liveGiftButton:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_liveGiftButton_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_liveGiftButton_icon")
case .giftViewBackpackButton: case .giftViewBackpackButton:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_giftViewBackpackButton_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_giftViewBackpackButton_icon")
case .giftViewBackpackSendButton, .giftViewSendButton: case .giftViewBackpackSendButton, .giftViewSendButton:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_liveGiftButton_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_liveGiftButton_icon")
case .pkLightUp: case .pkLightUp:
return FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_pkLightUp_icon") return FUSShowRoomCenterBunble.imageNamed("user_guide_tips_pkLightUp_icon")
} }
} }
......
...@@ -37,7 +37,7 @@ class FFUserGuideTipsView: UIView { ...@@ -37,7 +37,7 @@ class FFUserGuideTipsView: UIView {
// private let rippleView = UIView() // private let rippleView = UIView()
// private var radarAnimationView: RectRadarAnimationView? // private var radarAnimationView: RectRadarAnimationView?
private let rippleView = FFUserGuideRippleView(frame: .zero) private let rippleView = FFUserGuideRippleView(frame: .zero)
private let connectImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_connect_upon_image")) private let connectImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("user_guide_tips_connect_upon_image"))
private let textContentBgView = UIView() private let textContentBgView = UIView()
private let iconImageView = UIImageView() private let iconImageView = UIImageView()
private let contentLabelBgView = UIView() private let contentLabelBgView = UIView()
...@@ -114,10 +114,10 @@ class FFUserGuideTipsView: UIView { ...@@ -114,10 +114,10 @@ class FFUserGuideTipsView: UIView {
let connectImageViewW: CGFloat = 6 let connectImageViewW: CGFloat = 6
let connectImageViewH: CGFloat = 25 let connectImageViewH: CGFloat = 25
if showUpon == true{ if showUpon == true{
connectImageView.image = FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_connect_upon_image") connectImageView.image = FUSShowRoomCenterBunble.imageNamed("user_guide_tips_connect_upon_image")
connectImageView.frame = CGRectMake(CGRectGetMidX(targetViewFrame) - connectImageViewW/2, targetViewFrame.origin.y - connectImageViewH - 4, connectImageViewW, connectImageViewH) connectImageView.frame = CGRectMake(CGRectGetMidX(targetViewFrame) - connectImageViewW/2, targetViewFrame.origin.y - connectImageViewH - 4, connectImageViewW, connectImageViewH)
}else { }else {
connectImageView.image = FUSShowRoomCenterBunble.versionImageNamed("user_guide_tips_connect_below_image") connectImageView.image = FUSShowRoomCenterBunble.imageNamed("user_guide_tips_connect_below_image")
connectImageView.frame = CGRectMake(CGRectGetMidX(targetViewFrame) - connectImageViewW/2, CGRectGetMaxY(targetViewFrame) + 4, connectImageViewW, connectImageViewH) connectImageView.frame = CGRectMake(CGRectGetMidX(targetViewFrame) - connectImageViewW/2, CGRectGetMaxY(targetViewFrame) + 4, connectImageViewW, connectImageViewH)
} }
......
...@@ -306,6 +306,7 @@ BDAlphaPlayerMetalViewDelegate ...@@ -306,6 +306,7 @@ BDAlphaPlayerMetalViewDelegate
@property (nonatomic, assign) NSInteger enterRoomInterval; @property (nonatomic, assign) NSInteger enterRoomInterval;
@property (nonatomic, assign) BOOL userRatingDidShowed; @property (nonatomic, assign) BOOL userRatingDidShowed;
@property (nonatomic, assign) BOOL recallWellcomeDidShowed; @property (nonatomic, assign) BOOL recallWellcomeDidShowed;
@property (nonatomic, assign) BOOL pkLightUpDidShowed;
// 直播时长view // 直播时长view
@property (nonatomic, strong) FUSLiveTimeRecordView *liveTimeRecordView; @property (nonatomic, strong) FUSLiveTimeRecordView *liveTimeRecordView;
...@@ -2596,6 +2597,12 @@ BDAlphaPlayerMetalViewDelegate ...@@ -2596,6 +2597,12 @@ BDAlphaPlayerMetalViewDelegate
NSString *bondsChange = [dict[@"changebonds"] description]; NSString *bondsChange = [dict[@"changebonds"] description];
NSString *bonds = [[dict objectForKey:@"bonds"] description]; NSString *bonds = [[dict objectForKey:@"bonds"] description];
NSString *chipNum = [[dict objectForKey:@"chip"] description]; NSString *chipNum = [[dict objectForKey:@"chip"] description];
NSString *userOffer = [[dict objectForKey:@"userOffer"] description];
NSString *userId = [[dict objectForKey:@"userId"] description];
if (userOffer.integerValue > 0) {
[self.linkMicroView.linkMicDataHelper ff_updateUserOffer:userOffer forUid:userId];
}
if (chipNum.doubleValue != 0) { if (chipNum.doubleValue != 0) {
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(specialSecondAfterHidedewIncreaseView) object:nil]; [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(specialSecondAfterHidedewIncreaseView) object:nil];
...@@ -5060,6 +5067,8 @@ BDAlphaPlayerMetalViewDelegate ...@@ -5060,6 +5067,8 @@ BDAlphaPlayerMetalViewDelegate
_enterRoomInterval = 1; _enterRoomInterval = 1;
_userRatingDidShowed = NO; _userRatingDidShowed = NO;
_recallWellcomeDidShowed = NO; _recallWellcomeDidShowed = NO;
_pkLightUpDidShowed = ![[FFUserGuideTipsHelper share] ff_shouldShowWithType:FFUserGuideTipsTypePkLightUp];
[[FFUserGuideTipsHelper share] ff_reloadData];
} }
[self fus_updateTreasureBoxListIconType:1]; [self fus_updateTreasureBoxListIconType:1];
...@@ -5107,6 +5116,21 @@ BDAlphaPlayerMetalViewDelegate ...@@ -5107,6 +5116,21 @@ BDAlphaPlayerMetalViewDelegate
_enterRoomTimer = nil; _enterRoomTimer = nil;
} }
// 点亮pk引导
if (_enterRoomInterval >= 10 &&
self.isKeyboard == NO &&
FUSSwiftLiveHelper.shared.pkHelper.ocViewModel.currentPKState == FFPKStateInPKTime &&
_pkLightUpDidShowed == NO) {
CGFloat imageW = 36;
CGRect pkLightUpFrame = CGRectMake(UIView.fus_screenW - imageW - 18, self.chatTableView.superview.y, imageW, imageW);
UIButton *pkLightUpBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[pkLightUpBtn setBackgroundImage:[FUSShowRoomCenterBunble imageNamed:@"user_guide_tips_pkLightUp_tapBtn"] forState:UIControlStateNormal];
[pkLightUpBtn addTarget:self action:@selector(fus_sendClickLiveEvent) forControlEvents:UIControlEventTouchUpInside];
[[FFUserGuideTipsHelper share] ff_showTipsWithType:FFUserGuideTipsTypePkLightUp showUpon:NO showOn:[self fus_viewWithLayer:FUSLiveFunctionLayerFunctionButtons] targetCoverView:pkLightUpBtn frame:pkLightUpFrame];
[[FFUserGuideTipsHelper share] ff_completeGuideWithType:FFUserGuideTipsTypePkLightUp];
_pkLightUpDidShowed = YES;
}
_enterRoomInterval += 1; _enterRoomInterval += 1;
} }
......
...@@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
// 直播等级 // 直播等级
@property (nonatomic, copy) NSString *lev; @property (nonatomic, copy) NSString *lev;
/// 用户贡献萤火
@property (nonatomic, copy) NSString *userOffer;
// privilege:vip权益 // privilege:vip权益
@property (nonatomic, copy) NSDictionary *privilege; @property (nonatomic, copy) NSDictionary *privilege;
......
//
// FFLinkMicDataHelper.h
// LiveRoom
//
// Created by pierce on 2024/12/12.
//
#import <Foundation/Foundation.h>
#import "FUSAgoraHelper.h"
#import "FUSLinkMicroModel.h"
@class FFLinkMicDataHelper;
typedef NS_ENUM(NSInteger, FFLiveRoomLinkMicMode) {
/// 申请上麦
FFLiveRoomLinkMicModeApply = 0,
/// 自由上麦
FFLiveRoomLinkMicModeAutoAccept = 1,
};
typedef NS_ENUM(NSInteger, FFLiveRoomLinkMicState) {
/// 当前无人上麦
FFLiveRoomLinkMicStateNormal = 0,
/// 观众、主播或者场控,有人申请上麦
FFLiveRoomLinkMicStateSomeoneApplying = 1,
/// 当前正在连麦
FFLiveRoomLinkMicStateSelfOnmic = 2,
};
@protocol FFLinkMicDataHelperDelegate <NSObject>
/// 当前麦上人说话的情况
- (void)fflinkMicDataHelper:(FFLinkMicDataHelper *)linkMicDataHelper reportAudioVolumeIndicationOfSpeakers:(NSArray *)speakers;
/// 有人进入直播间
- (void)fflinkMicDataHelper:(FFLinkMicDataHelper *)linkMicDataHelper didJoinedOfUid:(NSUInteger)uid;
/// 回调当前获取到的 (2s回调一次)
/// @param bite 统计周期内,实际接收到的远端视频码率
/// @param uid 对应人的uid
- (void)fflinkMicDataHelper:(FFLinkMicDataHelper *)linkMicDataHelper receivedBitrate:(NSInteger)bite uid:(NSInteger)uid;
/// 有人离线
/// @param reason 离线原因
- (void)fflinkMicDataHelper:(FFLinkMicDataHelper *)linkMicDataHelper didOfflineOfUid:(NSUInteger)uid reason:(AgoraUserOfflineReason)reason;
@end
NS_ASSUME_NONNULL_BEGIN
@interface FFLinkMicDataHelper : NSObject
@property (nonatomic, strong, readonly) NSString *channelId;
@property (nonatomic, strong, readonly) NSString *roomId;
//@property (nonatomic, strong, readonly) FFAgoraHelper *linkMicAgoraHelper;
@property (nonatomic, strong) NSMutableArray<FUSLinkMicroModel *> *models;
@property (nonatomic, strong) NSMutableDictionary<NSString *, FUSLinkMicroModel *> *modelsDict;
/// 连麦外部回调
@property (nonatomic, weak) id<FFLinkMicDataHelperDelegate> agoraEventDelegate;
// 自己是否上麦用户
@property (nonatomic, assign, readonly) BOOL selfOnMicList;
// 是否自己闭的麦
@property (nonatomic, assign) BOOL selfCloseMic;
// 是否是自己申请的连麦
@property (nonatomic, assign, readonly) BOOL selfRequestMic;
/// 连麦状态
@property (nonatomic, assign, readonly) FFLiveRoomLinkMicState linkMicState;
/// 连麦状态改变
@property (nonatomic, copy) void(^linkMicStateDidChangedHandler)(FFLiveRoomLinkMicState linkMicState);
/// 连麦数据改变
@property (nonatomic, copy) void(^linkMicDatasDidChangedHandler)(NSArray<FUSLinkMicroModel *> *models);
/// 当前直播间的连麦配置
@property (nonatomic, assign, readonly) FFLiveRoomLinkMicMode linkMicMode;
- (instancetype)initWithRoomId:(NSString *)roomId channelId:(NSString *)channelId;
- (void)ff_updateRoomId:(NSString *)roomId channelId:(NSString *)channelId;
- (void)ffjoinChannelSuccess:(void(^)(void))success
failure:(void(^)(void))failure;
/// 邀请用户上麦
/// @param uid 用户uid
- (void)ffinvitUserLinkMicroWitUid:(NSString *)uid;
// 改变自己的麦位状态
- (void)ffswitchMicStatus:(BOOL)onMic;
/// 根据uid改变自己的麦位状态
- (void)ffswitchMicStatus:(BOOL)onMic uid:(NSString *)uid;
- (void)ffsetUserInfos:(NSArray<FUSLinkMicroModel *> *)userModels;
- (void)ff_offMicUser:(NSString *)uid;
/// 本地音频静音
- (void)ff_switchLocalAudio:(BOOL)mute;
/// 停止连麦, 退出直播间, 上报服务器
- (void)ffstopLinkMic;
/// 停止连麦, 专门负责byre RTC
- (void)ffstopRTCLinkMic;
/// 退出频道,不上报服务器
- (void)ffexitLinkMicChannel;
/// 退出声网,销毁声网,不通知后台
- (void)ffdestroyLinkMic;
- (void)ff_resetHelper;
/// 拉取用户列表
- (void)requestOnlineData;
/// 根据当前状态改变申请申请连麦的状态
- (void)ff_changedAudienceSelfRequestMic;
- (void)ff_updateUserOffer:(NSString *)userOffer forUid:(NSString *)uid;
@end
NS_ASSUME_NONNULL_END
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#import "FUSLinkMicroModel.h" #import "FUSLinkMicroModel.h"
#import "FUSLinkMicItemView.h" #import "FUSLinkMicItemView.h"
#import "FUSAgoraHelper.h" #import "FUSAgoraHelper.h"
#import "FFLinkMicDataHelper.h"
@class FUSLinkMicroUserListView; @class FUSLinkMicroUserListView;
...@@ -51,12 +52,15 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -51,12 +52,15 @@ NS_ASSUME_NONNULL_BEGIN
@interface FUSLinkMicroUserListView : UIView @interface FUSLinkMicroUserListView : UIView
@property (nonatomic, copy) void(^didClickActionHandle)(FUSLinkMicroModel *model); @property (nonatomic, copy) void(^didClickActionHandle)(FUSLinkMicroModel *model);
@property (nonatomic, copy) void(^heightDidChangedHandler)(CGFloat height);
// 麦位上面的用户列表 // 麦位上面的用户列表
@property (nonatomic, strong, readonly) NSArray<FUSLinkMicroModel *> *micListArr; @property (nonatomic, strong, readonly) NSArray<FUSLinkMicroModel *> *micListArr;
@property (nonatomic, weak) id<FUSLinkMicUserListDelegate> micListDelegate; @property (nonatomic, weak) id<FUSLinkMicUserListDelegate> micListDelegate;
@property (nonatomic, strong, readonly) FFLinkMicDataHelper *linkMicDataHelper;
// 是否自己闭的麦 // 是否自己闭的麦
@property (nonatomic, assign) BOOL selfCloseMic; @property (nonatomic, assign) BOOL selfCloseMic;
......
...@@ -10,4 +10,7 @@ import UIKit ...@@ -10,4 +10,7 @@ import UIKit
@objc public class FUSShowRoomUDKeyStore: NSObject { @objc public class FUSShowRoomUDKeyStore: NSObject {
@objc public static let pkAnimationControlLocalStoreKey: String = "FUSShowRoomUDKeyStore_pkAnimationControlLocalStoreKey" @objc public static let pkAnimationControlLocalStoreKey: String = "FUSShowRoomUDKeyStore_pkAnimationControlLocalStoreKey"
// 等待上麦的人数
@objc public static let waitingLinkMicAmountUDKey = "waitingLinkMicAmountUDKey"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment