Commit 3632b6ed by ludi

Merge branch 'feature/v57版本pk迁移' of http://git.yabolive.net:88/pidan/FuSiLive…

Merge branch 'feature/v57版本pk迁移' of http://git.yabolive.net:88/pidan/FuSiLive into feature/v57版本pk迁移

# Conflicts:
#	Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
parents a1ee7196 e7426994
Showing with 104 additions and 58 deletions
...@@ -3,4 +3,18 @@ ...@@ -3,4 +3,18 @@
uuid = "B049FF9C-951B-453D-AC4A-81CEFF8490BE" uuid = "B049FF9C-951B-453D-AC4A-81CEFF8490BE"
type = "0" type = "0"
version = "2.0"> version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
uuid = "D798D2B1-6DBF-4849-80D6-BA0F31D198E1"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
breakpointStackSelectionBehavior = "1"
scope = "1"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket> </Bucket>
...@@ -763,6 +763,8 @@ ...@@ -763,6 +763,8 @@
3E261EA82F2C5FAB0008C0C0 /* FUSLinkMicMediator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */; }; 3E261EA82F2C5FAB0008C0C0 /* FUSLinkMicMediator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */; };
3E261EB02F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EAE2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h */; }; 3E261EB02F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E261EAE2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.h */; };
3E261EB12F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EAF2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m */; }; 3E261EB12F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E261EAF2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m */; };
3E4DC89A2F580A46003070EC /* live_link_mic_boy_speak_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3E4DC8982F580A46003070EC /* live_link_mic_boy_speak_anim.webp */; };
3E4DC89B2F580A46003070EC /* live_link_mic_girl_speak_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3E4DC8992F580A46003070EC /* live_link_mic_girl_speak_anim.webp */; };
3E50054E2F556DC300058145 /* FUSLiveRTCData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E50054D2F556DC300058145 /* FUSLiveRTCData.swift */; }; 3E50054E2F556DC300058145 /* FUSLiveRTCData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E50054D2F556DC300058145 /* FUSLiveRTCData.swift */; };
BE189D972C733B450008418B /* FSRActiveModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE189CE52C733B450008418B /* FSRActiveModel.h */; }; BE189D972C733B450008418B /* FSRActiveModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE189CE52C733B450008418B /* FSRActiveModel.h */; };
BE189D982C733B450008418B /* FSRActiveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BE189CE62C733B450008418B /* FSRActiveModel.m */; }; BE189D982C733B450008418B /* FSRActiveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BE189CE62C733B450008418B /* FSRActiveModel.m */; };
...@@ -2784,6 +2786,8 @@ ...@@ -2784,6 +2786,8 @@
3E261EA62F2C5FAB0008C0C0 /* FUSLinkMicMediator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLinkMicMediator.m; 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>"; }; 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>"; }; 3E261EAF2F2CA6890008C0C0 /* FUSLinkMicStreamConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLinkMicStreamConfig.m; sourceTree = "<group>"; };
3E4DC8982F580A46003070EC /* live_link_mic_boy_speak_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_link_mic_boy_speak_anim.webp; sourceTree = "<group>"; };
3E4DC8992F580A46003070EC /* live_link_mic_girl_speak_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_link_mic_girl_speak_anim.webp; sourceTree = "<group>"; };
3E50054D2F556DC300058145 /* FUSLiveRTCData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRTCData.swift; sourceTree = "<group>"; }; 3E50054D2F556DC300058145 /* FUSLiveRTCData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRTCData.swift; 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>"; }; 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>"; }; 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>"; };
...@@ -7448,6 +7452,8 @@ ...@@ -7448,6 +7452,8 @@
00E6CE1B2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp */, 00E6CE1B2F56E36500B63797 /* live_pk_host_win_draw_reward_type2_anim.webp */,
00CD220A2F580A2200A07432 /* live_pk_progress_light_anim.webp */, 00CD220A2F580A2200A07432 /* live_pk_progress_light_anim.webp */,
00CD220C2F580A9000A07432 /* live_pk_progress_light_anim_gift_bomb.webp */, 00CD220C2F580A9000A07432 /* live_pk_progress_light_anim_gift_bomb.webp */,
3E4DC8982F580A46003070EC /* live_link_mic_boy_speak_anim.webp */,
3E4DC8992F580A46003070EC /* live_link_mic_girl_speak_anim.webp */,
BEF675EC2C6B156500A670FB /* live_linkmic_bgImg.png */, BEF675EC2C6B156500A670FB /* live_linkmic_bgImg.png */,
BEF675ED2C6B156500A670FB /* live_pk_background_image.png */, BEF675ED2C6B156500A670FB /* live_pk_background_image.png */,
00A1DCF62CA6B2C50000541F /* liveRoom_patAudience_pat_animate.webp */, 00A1DCF62CA6B2C50000541F /* liveRoom_patAudience_pat_animate.webp */,
...@@ -8014,6 +8020,8 @@ ...@@ -8014,6 +8020,8 @@
BED65B742C5CE68700668116 /* FUSFilterItemCell.xib in Resources */, BED65B742C5CE68700668116 /* FUSFilterItemCell.xib in Resources */,
BED65B8D2C5CE6EA00668116 /* FUSLiveTreasureBoxGrabView.xib in Resources */, BED65B8D2C5CE6EA00668116 /* FUSLiveTreasureBoxGrabView.xib in Resources */,
BEF6777B2C6B156600A670FB /* PK_Win_Animation_46@2x.png in Resources */, BEF6777B2C6B156600A670FB /* PK_Win_Animation_46@2x.png in Resources */,
3E4DC89A2F580A46003070EC /* live_link_mic_boy_speak_anim.webp in Resources */,
3E4DC89B2F580A46003070EC /* live_link_mic_girl_speak_anim.webp in Resources */,
BEF6779D2C6B156600A670FB /* pk_win_streak_2@3x.png in Resources */, BEF6779D2C6B156600A670FB /* pk_win_streak_2@3x.png in Resources */,
BEF677932C6B156600A670FB /* PK_Win_Animation_70@2x.png in Resources */, BEF677932C6B156600A670FB /* PK_Win_Animation_70@2x.png in Resources */,
BEF677372C6B156600A670FB /* PK_Start_Animation_4@2x.png in Resources */, BEF677372C6B156600A670FB /* PK_Start_Animation_4@2x.png in Resources */,
...@@ -2175,7 +2175,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) { ...@@ -2175,7 +2175,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
return _streamView.playView; return _streamView.playView;
} }
- (FUSStreamPlayView *)ff_playViewForMainUid:(NSString *)mainUid { - (FUSStreamPlayView *)fus_playViewForMainUid:(NSString *)mainUid {
if ([self.playView.mainUID isEqual:mainUid]) { if ([self.playView.mainUID isEqual:mainUid]) {
return self.playView; return self.playView;
} }
...@@ -2351,7 +2351,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) { ...@@ -2351,7 +2351,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
[self performSelector:@selector(setupPictureInPicture) afterDelay:0.3]; [self performSelector:@selector(setupPictureInPicture) afterDelay:0.3];
} }
- (void)setupPictureInPicture { - (void)setupPictureInPicture {
return;
if (self.autoStartPictureInPicture == NO) { if (self.autoStartPictureInPicture == NO) {
return; return;
} }
...@@ -2370,6 +2370,32 @@ typedef NS_ENUM(NSInteger, FUSStreamState) { ...@@ -2370,6 +2370,32 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
self.pipController.videoGravity = AVLayerVideoGravityResizeAspectFill; self.pipController.videoGravity = AVLayerVideoGravityResizeAspectFill;
self.pipController.delegate = self; self.pipController.delegate = self;
[self.pipController prepareWithCompletion:nil]; [self.pipController prepareWithCompletion:nil];
CGRect rect = FUSSwiftLiveHelper.shared.pkHelper.ocViewModel.currentPKState == FFPKStateNone ? CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenW * 16 / 9) : CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenW * 16 / 18);
[self setPictureInPictureVideoFrame:rect];
__weak typeof(self) weakSelf = self;
self.playView.playTypeDidChangedHandler = ^(FUSStreamPlayViewPlayType type) {
switch (type) {
case FUSStreamPlayViewPlayTypeNewPK:
{
CGRect rect = CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenW * 16 / 18);
[weakSelf setPictureInPictureVideoFrame:rect];
break;
}
case FUSStreamPlayViewPlayTypePK:
case FUSStreamPlayViewPlayTypeNormal:
case FUSStreamPlayViewPlayTypeLinkMic:
[weakSelf setPictureInPictureVideoFrame:weakSelf.view.bounds];
break;
default:
break;
}
};
} }
self.pipController.contentView = self.playView; self.pipController.contentView = self.playView;
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
// //
// VELPictureInPictureController.h // VELPictureInPictureController.h
// VELLiveDemo // VELLiveDemo
// //
// Created by Volcano Engine Team on 2023/08/30. // Created by Volcano Engine Team on 2023/08/30.
// //
// Copyright (c) 2023/08/30 Beijing Volcano Engine Technology Ltd. // Copyright (c) 2023/08/30 Beijing Volcano Engine Technology Ltd.
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#import <AVKit/AVKit.h> #import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h> #import <AVFoundation/AVFoundation.h>
//#import <VELCommon/VELCommon.h> //#import <VELCommon/VELCommon.h>
// 是否开启 iOS 15 以下画中画支持 // 是否开启 iOS 15 以下画中画支持
// 会调用未公开 API, 可能会有审核风险,请业务自行决定是否开启 // 会调用未公开 API, 可能会有审核风险,请业务自行决定是否开启
#define VEL_PICTURE_IN_PICTURE_ENABLE_PIP_BELOW_IOS_15 1 #define VEL_PICTURE_IN_PICTURE_ENABLE_PIP_BELOW_IOS_15 1
#ifndef VELPipLog #ifndef VELPipLog
...@@ -52,27 +52,27 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -52,27 +52,27 @@ NS_ASSUME_NONNULL_BEGIN
@class VELPictureInPictureController; @class VELPictureInPictureController;
@protocol VELPictureInPictureDelegate <NSObject> @protocol VELPictureInPictureDelegate <NSObject>
@optional @optional
// 画中画准备完成 // 画中画准备完成
- (void)pictureInPictureIsReady:(VELPictureInPictureController *)pictureInPicture; - (void)pictureInPictureIsReady:(VELPictureInPictureController *)pictureInPicture;
// 画中画将要开始 // 画中画将要开始
- (void)pictureInPictureWillStart:(VELPictureInPictureController *)pictureInPicture; - (void)pictureInPictureWillStart:(VELPictureInPictureController *)pictureInPicture;
// 画中画已经开始 // 画中画已经开始
- (void)pictureInPictureDidStart:(VELPictureInPictureController *)pictureInPicture; - (void)pictureInPictureDidStart:(VELPictureInPictureController *)pictureInPicture;
// 画中画启动失败 // 画中画启动失败
- (void)pictureInPicture:(VELPictureInPictureController *)pictureInPicture - (void)pictureInPicture:(VELPictureInPictureController *)pictureInPicture
failedToStartWithError:(NSError *)error; failedToStartWithError:(NSError *)error;
// 画中画将要结束 // 画中画将要结束
- (void)pictureInPictureWillStop:(VELPictureInPictureController *)pictureInPicture isUserStop:(BOOL)isUserStop; - (void)pictureInPictureWillStop:(VELPictureInPictureController *)pictureInPicture isUserStop:(BOOL)isUserStop;
// 画中画已经结束 // 画中画已经结束
- (void)pictureInPictureDidStop:(VELPictureInPictureController *)pictureInPicture isUserStop:(BOOL)isUserStop; - (void)pictureInPictureDidStop:(VELPictureInPictureController *)pictureInPicture isUserStop:(BOOL)isUserStop;
// 画中画将要结束,需要重新布局原来的画面 // 画中画将要结束,需要重新布局原来的画面
// 如果没有实现当前代理,内部会自动布局,contentView 和其父视图大小完全一致 // 如果没有实现当前代理,内部会自动布局,contentView 和其父视图大小完全一致
- (void)pictureInPicture:(VELPictureInPictureController *)pictureInPicture - (void)pictureInPicture:(VELPictureInPictureController *)pictureInPicture
restoreUserInterfaceWithCompletionHandler:(void (^)(BOOL restored))completionHandler restoreUserInterfaceWithCompletionHandler:(void (^)(BOOL restored))completionHandler
isUserStop:(BOOL)isUserStop; isUserStop:(BOOL)isUserStop;
...@@ -101,97 +101,98 @@ typedef NS_ENUM(NSInteger, VELPictureInPictureType) { ...@@ -101,97 +101,98 @@ typedef NS_ENUM(NSInteger, VELPictureInPictureType) {
VELPictureInPictureTypeContentSourceAVPlayer API_AVAILABLE(ios(15.0)) = 2, VELPictureInPictureTypeContentSourceAVPlayer API_AVAILABLE(ios(15.0)) = 2,
#endif #endif
VELPictureInPictureTypeContentSource API_AVAILABLE(ios(15.0)) = 3, VELPictureInPictureTypeContentSource API_AVAILABLE(ios(15.0)) = 3,
// 自动根据系统选择 // 自动根据系统选择
VELPictureInPictureTypeAuto = 4 VELPictureInPictureTypeAuto = 4
}; };
@class VELPictureInPictureController; @class VELPictureInPictureController;
// 画中画准备完成回调 // 画中画准备完成回调
typedef void (^VELPipPrepareCompletionBlock)(VELPictureInPictureController * pipController, NSError *_Nullable error); typedef void (^VELPipPrepareCompletionBlock)(VELPictureInPictureController * pipController, NSError *_Nullable error);
// 基类,主要处理不同场景下的相同业务逻辑 // 基类,主要处理不同场景下的相同业务逻辑
@interface VELPictureInPictureController : NSObject @interface VELPictureInPictureController : NSObject
// 需要小窗的视图 // 需要小窗的视图
@property (nonatomic, weak, nullable) UIView *contentView; @property (nonatomic, weak, nullable) UIView *contentView;
// contentView 所在的容器 // contentView 所在的容器
@property (nonatomic, weak, nullable) UIViewController *contentController; @property (nonatomic, weak, nullable) UIViewController *contentController;
// 如果配置了 contentController 并且这个值设置为 YES。 // 如果配置了 contentController 并且这个值设置为 YES。
// 会在画中画启动的时候,把控制器隐藏。画中画结束后,自动展示该控制器 // 会在画中画启动的时候,把控制器隐藏。画中画结束后,自动展示该控制器
// 自动隐藏 contentController 默认 NO // 自动隐藏 contentController 默认 NO
@property (nonatomic, assign) BOOL autoHideContentController; @property (nonatomic, assign) BOOL autoHideContentController;
// 视频在 contentView 中的尺寸布局,用来存放画中画占位视图,如果不设置,内部自动计算 // 视频在 contentView 中的尺寸布局,用来存放画中画占位视图,如果不设置,内部自动计算
// 主要用于视频在非填充模式下,会有黑边,再设置占位视图的时候,尺寸大小不正确会有 UI 突变的问题 // 主要用于视频在非填充模式下,会有黑边,再设置占位视图的时候,尺寸大小不正确会有 UI 突变的问题
// 默认取 contentView.frame // 默认取 contentView.frame
@property (nonatomic, assign) CGRect videoFrame; @property (nonatomic, assign) CGRect videoFrame;
// 画中画占位视图,可以在画中画启动后,自行重新布局,内部初始会使用 contentView 的尺寸 // 画中画占位视图,可以在画中画启动后,自行重新布局,内部初始会使用 contentView 的尺寸
@property (nonatomic, strong, readonly) UIView *pipHolderView; @property (nonatomic, strong, readonly) UIView *pipHolderView;
// 代理回调 // 代理回调
@property (nonatomic, weak) id <VELPictureInPictureDelegate> delegate; @property (nonatomic, weak) id <VELPictureInPictureDelegate> delegate;
// 画中画填充模式 // 画中画填充模式
// 默认: AVLayerVideoGravityResize // 默认: AVLayerVideoGravityResize
@property (nonatomic, copy) AVLayerVideoGravity videoGravity; @property (nonatomic, copy) AVLayerVideoGravity videoGravity;
// 进入后台时,自动弹出小窗, 默认 YES // 进入后台时,自动弹出小窗, 默认 YES
// 如果配置了 YES,画中画配置完成后,会在后台持续循环播放黑帧视频,App 进入后台后,会自动弹出小窗 // 如果配置了 YES,画中画配置完成后,会在后台持续循环播放黑帧视频,App 进入后台后,会自动弹出小窗
@property (nonatomic, assign) BOOL canStartPictureInPictureAutomaticallyFromInline API_AVAILABLE(ios(14.2)); @property (nonatomic, assign) BOOL canStartPictureInPictureAutomaticallyFromInline API_AVAILABLE(ios(14.2));
// 是否可以调用 start 方法开启画中画 // 是否可以调用 start 方法开启画中画
@property (nonatomic, assign, readonly) BOOL canStartPictureInPicture; @property (nonatomic, assign, readonly) BOOL canStartPictureInPicture;
// 在手动启动画中画失败后,自动降级重试, 默认 NO // 在手动启动画中画失败后,自动降级重试, 默认 NO
// 如果开启,iOS 15 及以上系统的降级顺序是 ContentSource -> AVPlayerViewController -> AVPlayer // 如果开启,iOS 15 及以上系统的降级顺序是 ContentSource -> AVPlayerViewController -> AVPlayer
// 如果开启,iOS 15 及以上系统的降级顺序是 AVPlayerViewController -> AVPlayer // 如果开启,iOS 15 及以上系统的降级顺序是 AVPlayerViewController -> AVPlayer
@property (nonatomic, assign, readonly) BOOL downgradeWhenStartFailed; @property (nonatomic, assign, readonly) BOOL downgradeWhenStartFailed;
// 画中画状态 // 画中画状态
@property (atomic, assign, readonly) VELPictureInPictureState state; @property (atomic, assign, readonly) VELPictureInPictureState state;
// 画中画类型 // 画中画类型
@property (atomic, assign, readonly) VELPictureInPictureType type; @property (atomic, assign, readonly) VELPictureInPictureType type;
// 初始化画中画控制器 // 初始化画中画控制器
- (instancetype)initWithType:(VELPictureInPictureType)type NS_DESIGNATED_INITIALIZER; - (instancetype)initWithType:(VELPictureInPictureType)type NS_DESIGNATED_INITIALIZER;
// 初始化画中画控制器 // 初始化画中画控制器
- (instancetype)initWithContentView:(UIView *)contentView NS_DESIGNATED_INITIALIZER; - (instancetype)initWithContentView:(UIView *)contentView NS_DESIGNATED_INITIALIZER;
// 初始化画中画控制器 // 初始化画中画控制器
- (instancetype)initWithType:(VELPictureInPictureType)type contentView:(nullable UIView *)contentView NS_DESIGNATED_INITIALIZER; - (instancetype)initWithType:(VELPictureInPictureType)type contentView:(nullable UIView *)contentView NS_DESIGNATED_INITIALIZER;
// 准备 // 准备
- (void)prepareWithCompletion:(nullable VELPipPrepareCompletionBlock)completion; - (void)prepareWithCompletion:(nullable VELPipPrepareCompletionBlock)completion;
// 主动开启画中画 // 主动开启画中画
// 注意:只有 App 有声音播放时,才能正常启动画中画 // 注意:只有 App 有声音播放时,才能正常启动画中画
- (void)startPictureInPicture; - (void)startPictureInPicture;
// 停止当前正在展示的画中画,当进入后台,还会自动打开画中画 // 停止当前正在展示的画中画,当进入后台,还会自动打开画中画
- (void)stopPictureInPicture; - (void)stopPictureInPicture;
// 销毁当前画中画,不会再推入后台后自动开启画中画 // 销毁当前画中画,不会再推入后台后自动开启画中画
- (void)destroyPictureInPicture; - (void)destroyPictureInPicture;
// iOS 15 && type == VELPictureInPictureTypeContentSource 时使用 // iOS 15 && type == VELPictureInPictureTypeContentSource 时使用
- (void)enqueuePixelBuffer:(CVPixelBufferRef)pixelBuffer; - (void)enqueuePixelBuffer:(CVPixelBufferRef)pixelBuffer;
// iOS 15 && type == VELPictureInPictureTypeContentSource 时使用 // iOS 15 && type == VELPictureInPictureTypeContentSource 时使用
- (void)enqueueSampleBuffer:(CMSampleBufferRef)sampleBuffer; - (void)enqueueSampleBuffer:(CMSampleBufferRef)sampleBuffer;
// 销毁画中画所有实例,调用此方法后,不会在后台的时候自动弹出画中画,可以释放一部分内存 // 销毁画中画所有实例,调用此方法后,不会在后台的时候自动弹出画中画,可以释放一部分内存
+ (void)destroyPictureInPicture; + (void)destroyPictureInPicture;
// 是否支持画中画 // 是否支持画中画
+ (BOOL)isPictureInPictureSupported; + (BOOL)isPictureInPictureSupported;
// 当前是否已经有画中画在播放 // 当前是否已经有画中画在播放
+ (BOOL)isPictureInPictureStarted; + (BOOL)isPictureInPictureStarted;
@end @end
......
...@@ -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 *sex;
/// 用户贡献萤火 /// 用户贡献萤火
@property (nonatomic, copy) NSString *userOffer; @property (nonatomic, copy) NSString *userOffer;
......
...@@ -224,7 +224,7 @@ static NSString *const kByteRTCMediaStreamTypeBoth = @"kByteRTCMediaStreamTypeBo ...@@ -224,7 +224,7 @@ static NSString *const kByteRTCMediaStreamTypeBoth = @"kByteRTCMediaStreamTypeBo
return; return;
} }
if ([FUSLiveHelper shareInstance].roomInfoModel.roomId.integerValue) { if ([FUSLiveHelper shareInstance].roomInfoModel.roomId.integerValue != channelId.integerValue) {
FUSLogDebug(@"pp===中断加入频道 %@", channelId); FUSLogDebug(@"pp===中断加入频道 %@", channelId);
FUSLogDebug(@"pp===当前channelid %@", [FUSLiveHelper shareInstance].roomInfoModel.roomId); FUSLogDebug(@"pp===当前channelid %@", [FUSLiveHelper shareInstance].roomInfoModel.roomId);
return; return;
......
...@@ -21,16 +21,12 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -21,16 +21,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, nonatomic, strong) FUSLinkMicroModel *model; @property (nullable, nonatomic, strong) FUSLinkMicroModel *model;
@property (nonatomic, strong) UIButton *coverBtn;
@property (nonatomic, assign) BOOL cancelAnim; //不需要动画 @property (nonatomic, assign) BOOL cancelAnim; //不需要动画
@property (nonatomic, weak) id<FUSLinkMicroHeaderViewDelegate> delegate; @property (nonatomic, weak) id<FUSLinkMicroHeaderViewDelegate> delegate;
@property (nonatomic, copy) void(^completeRadarAnimationBlock)(void); @property (nonatomic, copy) void(^completeRadarAnimationBlock)(void);
/// 加号的动画
- (void)fus_changePlusBtnAnim:(BOOL)ifAnim;
/// 改变静音动态 /// 改变静音动态
/// @param mute 是否静音 /// @param mute 是否静音
...@@ -45,16 +41,13 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -45,16 +41,13 @@ NS_ASSUME_NONNULL_BEGIN
/// 停止所有动画 /// 停止所有动画
- (void)fus_stopAllAnimation; - (void)fus_stopAllAnimation;
/// 加号动画
- (void)fus_startPlusAnim;
/// 开始送礼动画 /// 开始送礼动画
/// @param url 礼物url /// @param url 礼物url
- (void)fus_startAnimWithImgUrl:(NSString *)url; - (void)fus_startAnimWithImgUrl:(NSString *)url;
- (void)fus_updateFrame; - (void)fus_updateFrame;
/// 取消红点
//- (void)fus_refreshUnreadRedPoint;
@end @end
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewType) { typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewType) {
FUSLiveMinimizeViewTypeNormalLive, FUSLiveMinimizeViewTypeNormalLive,
FUSLiveMinimizeViewTypePK, FUSLiveMinimizeViewTypePK,
FUSLiveMinimizeViewTypeBytePK,
FUSLiveMinimizeViewTypeLinkMicRoom, FUSLiveMinimizeViewTypeLinkMicRoom,
}; };
......
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