Commit cd04eabd by suolong

连买的底层介入

parent cf41be93
Showing with 217 additions and 5 deletions
......@@ -580,6 +580,12 @@
00E2A81A2F21C44C003B779E /* RectRadarAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E2A8172F21C44C003B779E /* RectRadarAnimationView.swift */; };
00E2A81B2F21C44C003B779E /* FFUserGuideTipsHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E2A8152F21C44C003B779E /* FFUserGuideTipsHelper.swift */; };
00E2A81C2F21C44C003B779E /* FFUserGuideCloseInfoAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E2A8142F21C44C003B779E /* FFUserGuideCloseInfoAlertView.swift */; };
3E261EA32F2C5F680008C0C0 /* FUSByteHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */; };
3E261EA42F2C5F680008C0C0 /* FUSByteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */; };
3E261EA72F2C5FAB0008C0C0 /* FUSLinkMicMediator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */; };
3E261EA82F2C5FAB0008C0C0 /* FUSLinkMicMediator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */; };
3E261EB02F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EAE2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h */; };
3E261EB12F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EAF2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m */; };
BE189D972C733B450008418B /* FSRActiveModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE189CE52C733B450008418B /* FSRActiveModel.h */; };
BE189D982C733B450008418B /* FSRActiveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BE189CE62C733B450008418B /* FSRActiveModel.m */; };
BE189D992C733B450008418B /* FSRActiveMotorEffectModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE189CE72C733B450008418B /* FSRActiveMotorEffectModel.h */; };
......@@ -2417,6 +2423,12 @@
00E2A8152F21C44C003B779E /* FFUserGuideTipsHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FFUserGuideTipsHelper.swift; sourceTree = "<group>"; };
00E2A8162F21C44C003B779E /* FFUserGuideTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FFUserGuideTipsView.swift; sourceTree = "<group>"; };
00E2A8172F21C44C003B779E /* RectRadarAnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RectRadarAnimationView.swift; 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>"; };
3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLinkMicMediator.h; sourceTree = "<group>"; };
3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLinkMicMediator.m; sourceTree = "<group>"; };
3E261EAE2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLinkMicStreamConfig.h; sourceTree = "<group>"; };
3E261EAF2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLinkMicStreamConfig.m; sourceTree = "<group>"; };
842ED23FEE639B8A5B65A322 /* Pods-FUSShowRoomModule.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FUSShowRoomModule.debug.xcconfig"; path = "Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule.debug.xcconfig"; sourceTree = "<group>"; };
97F831FBE9C41BC899CF9232 /* Pods-FUSShowRoomModule.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FUSShowRoomModule.release.xcconfig"; path = "Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule.release.xcconfig"; sourceTree = "<group>"; };
B8B2CC1956F16144828BF43D /* Pods_FUSShowRoomModule.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FUSShowRoomModule.framework; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -5214,6 +5226,8 @@
children = (
BED656A02C5B745D00668116 /* FUSLinkMicroModel.h */,
BED656A12C5B745D00668116 /* FUSLinkMicroModel.m */,
3E261EAE2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h */,
3E261EAF2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m */,
);
path = Model;
sourceTree = "<group>";
......@@ -5221,10 +5235,14 @@
BED656A72C5B745D00668116 /* Other */ = {
isa = PBXGroup;
children = (
3E261EA12F2C5F680008C0C0 /* FUSByteHelper.h */,
3E261EA22F2C5F680008C0C0 /* FUSByteHelper.m */,
BED656A32C5B745D00668116 /* FUSAgoraHelper.h */,
BED656A42C5B745D00668116 /* FUSAgoraHelper.m */,
BED656A52C5B745D00668116 /* FUSLinkMicroHttpHelper.h */,
BED656A62C5B745D00668116 /* FUSLinkMicroHttpHelper.m */,
3E261EA52F2C5FAB0008C0C0 /* FUSLinkMicMediator.h */,
3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */,
);
path = Other;
sourceTree = "<group>";
......@@ -6950,6 +6968,7 @@
0089FD802D13F3460030DAA7 /* FUSLiveParcelGiftView.h in Headers */,
0089FD812D13F3460030DAA7 /* FUSParcelMotorCell.h in Headers */,
BED65A852C5B745F00668116 /* FUSLiveWecomeEnterView.h in Headers */,
3E261EA32F2C5F680008C0C0 /* FUSByteHelper.h in Headers */,
BE189E312C733B460008418B /* FSRRecommonddictGameSettingActiveView.h in Headers */,
BED658732C5B745E00668116 /* FUSGiftSendToModel.h in Headers */,
BE189DD32C733B460008418B /* FSRMotorEffectSettingBackpackViewController.h in Headers */,
......@@ -7043,6 +7062,7 @@
BE78C8822C53591400F38855 /* FUSShowRoomModule.h in Headers */,
BED65A882C5B745F00668116 /* FUSResourceDownloadingView.h in Headers */,
BE189DD72C733B460008418B /* FSRPKLinkMicGameViewController.h in Headers */,
3E261EB02F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h in Headers */,
BE189DF72C733B460008418B /* FSRMotorEffectSettingBackpackCollectionViewCell.h in Headers */,
BED65A752C5B745F00668116 /* FUSWarningView.h in Headers */,
BED659F22C5B745F00668116 /* FUSPKBottomUserHeaderView.h in Headers */,
......@@ -7126,6 +7146,7 @@
00A516AC2CA265930022DE40 /* FUSCheckInDayRewardModel.h in Headers */,
BED659BF2C5B745F00668116 /* FUSEmitterView.h in Headers */,
BED65A402C5B745F00668116 /* FUSTreasureBoxHttpHelper.h in Headers */,
3E261EA72F2C5FAB0008C0C0 /* FUSLinkMicMediator.h in Headers */,
BED65B062C5B746000668116 /* FUSRecommendedHosterView.h in Headers */,
BE189DC52C733B460008418B /* FSREffectViewController.h in Headers */,
BED658DE2C5B745E00668116 /* FUSAudiencePopView.h in Headers */,
......@@ -8412,6 +8433,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3E261EA42F2C5F680008C0C0 /* FUSByteHelper.m in Sources */,
BE189D9C2C733B450008418B /* FSREffectModel.m in Sources */,
BE189DA42C733B450008418B /* FSRGiftModel.m in Sources */,
BE189DCC2C733B460008418B /* FSRGiftShowRoomRoomGuarderViewController.m in Sources */,
......@@ -8535,6 +8557,7 @@
BED659C82C5B745F00668116 /* FUSLiveTimeRecordView.m in Sources */,
BED658952C5B745E00668116 /* FUSLiveChatDataSourceHelper.m in Sources */,
BED65A332C5B745F00668116 /* FUSLiveShareToChatView.m in Sources */,
3E261EA82F2C5FAB0008C0C0 /* FUSLinkMicMediator.m in Sources */,
BED659AD2C5B745F00668116 /* FUSLiveGameCollectionViewCell.m in Sources */,
BE189DA82C733B450008418B /* FSRGuardOnlineGameModel.m in Sources */,
BE189E322C733B460008418B /* FSRRecommonddictGameSettingActiveView.m in Sources */,
......@@ -8868,6 +8891,7 @@
BED658FC2C5B745E00668116 /* FUSLiveChatGiftSuspendTipView.m in Sources */,
00E2A8192F21C44C003B779E /* FFUserGuideTipsView.swift in Sources */,
00E2A81A2F21C44C003B779E /* RectRadarAnimationView.swift in Sources */,
3E261EB12F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m in Sources */,
00E2A81B2F21C44C003B779E /* FFUserGuideTipsHelper.swift in Sources */,
00E2A81C2F21C44C003B779E /* FFUserGuideCloseInfoAlertView.swift in Sources */,
BED65A8B2C5B745F00668116 /* FUSVideoAuthorizationView.m in Sources */,
......
......@@ -298,6 +298,8 @@ typedef NS_ENUM(NSInteger, FUSFunctionMode) {
*/
- (void)fus_autoShowFirstChargeViewWhenBackFromRechargeIfNeeded;
/// 重置游戏相关的背景音乐
- (void)fus_replayGameHalfViewBgmIfNeeded;
/**
显示首充页面,显示于顶部
*/
......
......@@ -5205,8 +5205,14 @@ BDAlphaPlayerMetalViewDelegate
};
}
/**
- (void)fus_replayGameHalfViewBgmIfNeeded {
FUSHalfWebView *halfView = [self.halfWebManager fus_webViewWithUrl:self.bottomToolView.gameEntranceModel.url];
if (halfView) {
[((FUSWKWebView *)halfView.webView).wkWebView evaluateJavaScript:@"refreshAudioBgm()" completionHandler:^(id _Nullable obj, NSError * _Nullable error){
}];
}
}/**
显示半屏网页
*/
- (FUSHalfWebView *)fus_showHalfWebView:(FUSHalfWebViewModel *)gameEntranceModel {
......
//
// FUSLinkMicStreamConfig.h
// FUSShowRoomModule
//
// Created by 索隆 on 2026/1/30.
//
#import <Foundation/Foundation.h>
#import <AgoraRtcKit/AgoraRtcEngineKit.h>
#import <FUSStreamPushConfigModel.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, FUSLinkMicStreamCaptureSDKType) {
FUSLinkMicStreamSDKTypeByteSDKRTC = 0, //字节RTC
FUSLinkMicStreamSDKTypeAgoraSDKRTC = 1, // AgoraRTC
};
@interface FUSLinkMicStreamConfig : NSObject
// 采集推流的SDK类型
@property (nonatomic, assign) FUSLinkMicStreamCaptureSDKType captureSDKType;
@property (nonatomic, assign) AgoraClientRole role;
@property (nonatomic, strong) FUSStreamPushConfigModel *config;
@end
NS_ASSUME_NONNULL_END
//
// FUSLinkMicStreamConfig.m
// FUSShowRoomModule
//
// Created by 索隆 on 2026/1/30.
//
#import "FUSLinkMicStreamConfig.h"
@implementation FUSLinkMicStreamConfig
@end
......@@ -10,7 +10,6 @@
#import <AgoraRtcKit/AgoraRtcEngineKit.h>
#import "FUSStreamCaptureHelper.h"
#import "FUSLinkMicroModel.h"
#import "FUSLiveStreamView.h"
NS_ASSUME_NONNULL_BEGIN
......@@ -36,7 +35,7 @@ extern NSString * const kLiveLinkMicRoleDidChanged;
- (void)fus_agoraHelper:(FUSAgoraHelper *)helper receivedBitrate:(NSUInteger)bite uid:(NSInteger)uid;
/// 当前推流的状态
- (void)fus_agoraHelper:(FUSAgoraHelper *)helper localVideoStateChange:(AgoraVideoLocalState)state error:(AgoraLocalVideoStreamError)error;
- (void)fus_agoraHelper:(FUSAgoraHelper *)helper localVideoStateChangedOfState:(AgoraVideoLocalState)state error:(AgoraLocalVideoStreamError)error sourceType:(AgoraVideoSourceType)sourceType;
/// 当前流状态
- (void)fus_agoraHelper:(FUSAgoraHelper *)helper remoteVideoStateChangedOfUid:(NSUInteger)uid state:(AgoraVideoRemoteState)state;
......@@ -58,6 +57,14 @@ extern NSString * const kLiveLinkMicRoleDidChanged;
@property (nonatomic, assign, readonly) AgoraClientRole currentRole;
// 自己是否在麦上
@property (nonatomic, assign) BOOL myselfIsOnMic;
/// 设置变音,范围0.5--2.0,如果设置1,则为不变音
@property (nonatomic, assign) double localPitch;
+ (instancetype)shareInstance;
/// 初始化
/// @param role 进入频道的角色
//- (instancetype)initAgoraEngineWithClientRole:(AgoraClientRole)role;
......
//
// FUSByteHelper.h
// FUSShowRoomModule
//
// Created by 索隆 on 2026/1/30.
//
#import <Foundation/Foundation.h>
#import <AgoraRtcKit/AgoraRtcEngineKit.h>
#import <VolcEngineRTC/VolcEngineRTC.h>
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger {
FUSByteLinkMicAudioMode, //音频模式
FUSByteLinkMicVideoMode, //视频模式
} FUSByteLinkMicMode;
extern NSString * const kLiveLinkMicRoleDidChanged;
@class FUSByteHelper;
@protocol FUSByteHelperDelegate <NSObject>
- (void)fus_byteHelper:(FUSByteHelper *)helper reportAudioVolumeIndicationOfSpeakers:(NSArray *)speakers;
/// 有人加入字节
- (void)fus_byteHelper:(FUSByteHelper *)helper didJoinedOfUid:(NSUInteger)uid;
/// 有人离开字节
- (void)fus_byteHelper:(FUSByteHelper *)helper didOfflineOfUid:(NSUInteger)uid reason:(ByteRTCUserOfflineReason)reason;
/// 拉对应uid流的情况
- (void)fus_byteHelper:(FUSByteHelper *)helper receivedBitrate:(NSUInteger)bite uid:(NSInteger)uid;
/// 当前进入频道错误
- (void)fus_byteHelper:(FUSByteHelper *)helper joinChannelErrorOfChannelId:(NSUInteger)channrlId;
@end
@interface FUSByteHelper : NSObject
// 自己是否在麦上
@property (nonatomic, assign) BOOL myselfIsOnMic;
/// 相对于语音原始音调的升高/降低值,取值范围[-12,12],默认值为 0,即不做调整。
@property (nonatomic, assign) CGFloat localPitch;
@property (nonatomic, weak) id<FUSByteHelperDelegate> byteHelperDelegate;
// 多代理
@property (nonatomic, strong) NSPointerArray<FUSByteHelperDelegate> *byteHelperDelegates;
// 采集源,视频源,音频源
@property (nonatomic, weak) FUSStreamCaptureHelper<FUSPKStreamCaptureHelperProtocol> *captureHelper;
@property (nonatomic, assign, readonly) AgoraClientRole currentRole;
/// 初始化
/// @param role 进入频道的角色
+ (instancetype)shareByteWithClientRole:(AgoraClientRole)role;
/// 加入频道
/// @param token
/// @NSString channelId 房间ID
/// @NSString uid 自己的uid
- (void)fus_joinChannelWithToken:(nullable NSString *)token
ChannelId:(NSString *)channelId
uid:(NSString *)uid
success:(nullable void(^)(void))success
failure:(nullable void(^)(void))failure;
/**
停止连麦,退出频道,销毁字节
*/
- (void)fus_stopLinkMicroStreamingWithChannelId:(NSInteger)channelId
completionHandler:(nullable void(^)(void))completion;
/// 所有非己方的流经营
/// @param mute 是否静音
- (void)fus_muteAllRemoteAudioStreams:(BOOL)mute;
/// 设置静音
/// @param mute 是否静音
/// @param uid 相关流的ID
- (void)fus_muteAudioStreams:(BOOL)mute uid:(NSString *)uid;
/// 判断自己是否在频道内
- (BOOL)fus_inChannel;
/// 销毁
- (void)fus_destroy;
/// 调节指定人的音量大小
/// @NSUInteger uid
/// @int volume
- (void)fus_adjustUserPlaybackSignalVolume:(NSUInteger)uid volume:(int)volume;
/// 开麦
- (void)fus_openMicro;
/// 关麦
- (void)fus_closeMicro;
@end
NS_ASSUME_NONNULL_END
//
// FUSLinkMicMediator.h
// FUSShowRoomModule
//
// Created by 索隆 on 2026/1/30.
//
#import <Foundation/Foundation.h>
#import "FUSAgoraHelper.h"
#import "FUSLinkMicStreamConfig.h"
#import <FUSLinkMicStreamCaptureHelperProtocol.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSLinkMicMediator : NSObject <FUSLinkMicStreamCaptureHelperProtocol>
+ (instancetype)initWithConfig:(FUSLinkMicStreamConfig *)config;
@end
NS_ASSUME_NONNULL_END
......@@ -40,7 +40,23 @@ import UIKit
}
}
/// 添加一个webview管理
public func fus_webView(url: String) -> FUSHalfWebView? {
if url.count <= 0 {
return nil
}
for webViewKey in webViews.keys {
if webViewKey.contains(url)
|| url.contains(webViewKey) {
return webViews[webViewKey]?.value
}
}
return nil
}
/// 移除游戏页面
/// - Parameter isGameAlert: yes=移除游戏页面,no=移除非游戏页面
@objc public func fus_removeGameAlertWebView(isGameAlert: Bool){
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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