Commit b558158f by ludi

礼物下载有bug

parent 39fff5a8
Showing with 299 additions and 26 deletions
...@@ -1015,6 +1015,12 @@ NSString * const kMD5GiftResourceKey = @"kMD5GiftResourceKey"; ...@@ -1015,6 +1015,12 @@ NSString * const kMD5GiftResourceKey = @"kMD5GiftResourceKey";
[self checkResourceDownloadWithResourceUrl:strongModel.darkRes resourceMd5:strongModel.darkMd5 gid:strongModel.mid success:^{ [self checkResourceDownloadWithResourceUrl:strongModel.darkRes resourceMd5:strongModel.darkMd5 gid:strongModel.mid success:^{
} failure:^(NSString *msg, int code) { } failure:^(NSString *msg, int code) {
}]; }];
if (strongModel.audioresource != nil && strongModel.audioresource.length > 0) {
// 下载座驾声音
[self checkResourceDownloadWithResourceUrl:strongModel.audioresource resourceMd5:nil gid:strongModel.audioresource success:^{
} failure:^(NSString *msg, int code) {
}];
}
} }
}]; }];
}); });
......
...@@ -40,4 +40,7 @@ ...@@ -40,4 +40,7 @@
///座驾等级(1:经典、2:豪华、3:名贵、4:限量、5:定制) ///座驾等级(1:经典、2:豪华、3:名贵、4:限量、5:定制)
@property (nonatomic, assign) NSInteger carGrade; @property (nonatomic, assign) NSInteger carGrade;
/// 播放座驾音效
-(void)fus_playMotorAudioIfNeeded;
@end @end
...@@ -7,7 +7,36 @@ ...@@ -7,7 +7,36 @@
// //
#import "FUSMotorDataModel.h" #import "FUSMotorDataModel.h"
#import "FUSCommon/FUSCommon-Swift.h"
#import "FUSCacheDataShare.h"
@implementation FUSMotorDataModel @implementation FUSMotorDataModel
- (void)fus_playMotorAudioIfNeeded{
BOOL audioresourceIsNull = [NSString isNullWithString:self.audioresource];
BOOL localEnterRoomCarAudioSwitch = [FUSCacheDataShare shareStore].settingInitDataModel.localEnterRoomCarAudioSwitch == YES;
BOOL myselfIsOnMic = [FUSRouter liveRouter].selfOnMicList;
BOOL isNotAnchor = ![[FUSRouter liveRouter] isAnchor];
BOOL isPlayOnSpeaker = [[FUSAudioHelper shareInstance] isPlayOnSpeaker];
if (!audioresourceIsNull
&& localEnterRoomCarAudioSwitch
&& ((!myselfIsOnMic
&& isNotAnchor)
|| !isPlayOnSpeaker)) {
if ([[FUSGiftDataCenter sharedCenter] fus_checkGiftResourceExitWithURL:self.audioresource]) {
NSString *filePath = [FUSConfig.sharedInstanced.pathConfigs downloadResourcePath:self.audioresource pathMd5:self.audioresource];
[[FUSAudioHelper shareInstance] stop];
[[FUSAudioHelper shareInstance] playWithFilePath:filePath progress:^(NSTimeInterval currentTime) {
} playToEndHandler:^{
}];
}
}
}
@end @end
...@@ -1368,8 +1368,8 @@ typedef NS_ENUM(NSInteger, DisplayAt) { ...@@ -1368,8 +1368,8 @@ typedef NS_ENUM(NSInteger, DisplayAt) {
CGFloat keyboardHeight = keyboardFrame.size.height; CGFloat keyboardHeight = keyboardFrame.size.height;
[FUSKeyboardShowHelper sharedInstance].keyboardFrame = keyboardFrame; // [FUSKeyboardShowHelper sharedInstance].keyboardFrame = keyboardFrame;
[FUSKeyboardShowHelper sharedInstance].isShow = YES; // [FUSKeyboardShowHelper sharedInstance].isShow = YES;
animationMovementOnKeyboardShow = keyboardHeight - (UIView.fus_screenH - self.animation.height) + 70; animationMovementOnKeyboardShow = keyboardHeight - (UIView.fus_screenH - self.animation.height) + 70;
...@@ -1395,7 +1395,7 @@ typedef NS_ENUM(NSInteger, DisplayAt) { ...@@ -1395,7 +1395,7 @@ typedef NS_ENUM(NSInteger, DisplayAt) {
}]; }];
} }
[FUSKeyboardShowHelper sharedInstance].isShow = false; // [FUSKeyboardShowHelper sharedInstance].isShow = false;
} }
/** /**
......
...@@ -71,3 +71,9 @@ extern NSString * const UDKEY_COMMON_GUIDE_PAY_TIPS_CONTENT; ...@@ -71,3 +71,9 @@ extern NSString * const UDKEY_COMMON_GUIDE_PAY_TIPS_CONTENT;
@interface FUSCommonStoreUDKey : NSObject
/// 直播间经常座驾音效开关
+(NSString *)fus_enterMotorAudio;
@end
...@@ -69,5 +69,11 @@ NSString * const UDKEY_COMMON_VOICE_SIGN_DEMO_LIST = @"UDKEY_COMMON_VOICE_SIGN_D ...@@ -69,5 +69,11 @@ NSString * const UDKEY_COMMON_VOICE_SIGN_DEMO_LIST = @"UDKEY_COMMON_VOICE_SIGN_D
// 直播间”撩一下”储值tips // 直播间”撩一下”储值tips
NSString * const UDKEY_COMMON_GUIDE_PAY_TIPS_CONTENT = @"UDKEY_COMMON_GUIDE_PAY_TIPS_CONTENT"; NSString * const UDKEY_COMMON_GUIDE_PAY_TIPS_CONTENT = @"UDKEY_COMMON_GUIDE_PAY_TIPS_CONTENT";
@implementation FUSCommonStoreUDKey
/// 直播间经常座驾音效开关
+ (NSString *)fus_enterMotorAudio{
return @"/Common/CommonStoreUDKey/enterMotorAudio";
}
@end
...@@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)isAudience; - (BOOL)isAudience;
- (BOOL)hasUserInMic; - (BOOL)hasUserInMic;
- (BOOL)selfOnMicList;
- (BOOL)isRoomVisable; - (BOOL)isRoomVisable;
- (BOOL)isMinimize; - (BOOL)isMinimize;
- (NSInteger)fus_liveScopeType; - (NSInteger)fus_liveScopeType;
......
...@@ -72,12 +72,6 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -72,12 +72,6 @@ NS_ASSUME_NONNULL_BEGIN
/// 用户直播间入场消息折叠开关(0:关、1:开)默认是开 /// 用户直播间入场消息折叠开关(0:关、1:开)默认是开
@property (nonatomic, assign) NSInteger enterRoomMsgFoldSwitch; @property (nonatomic, assign) NSInteger enterRoomMsgFoldSwitch;
/// 座驾入场座驾音效控制按钮开关(0:关、1:开)
@property (nonatomic, assign) NSInteger enterRoomCarAudioShowSwitch;
/// 座驾入场座驾音效默认选项(0:关、1:开)
@property (nonatomic, assign) NSInteger enterRoomCarDefaultOption;
/// 平台商城应用开关(0:关、1:开) /// 平台商城应用开关(0:关、1:开)
@property (nonatomic, assign) NSInteger platformStoreShowSwitch; @property (nonatomic, assign) NSInteger platformStoreShowSwitch;
...@@ -119,6 +113,13 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -119,6 +113,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) FUSSettingFusiConfigModel *fusiConfig; @property (nonatomic, strong) FUSSettingFusiConfigModel *fusiConfig;
/// 座驾入场座驾音效控制按钮开关(0:关、1:开)
@property (nonatomic, assign) NSInteger enterRoomCarAudioShowSwitch;
/// 座驾入场座驾音效默认选项(0:关、1:开)
@property (nonatomic, assign) NSInteger enterRoomCarDefaultOption;
/// 座驾入场座驾音效控制按钮开关(0:关、1:开)
@property (nonatomic, assign) NSInteger localEnterRoomCarAudioSwitch;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -6,9 +6,25 @@ ...@@ -6,9 +6,25 @@
// //
#import "FUSSettingInitDataModel.h" #import "FUSSettingInitDataModel.h"
#import "FUSCommonUDKeys.h"
@implementation FUSSettingInitDataModel @implementation FUSSettingInitDataModel
@synthesize localEnterRoomCarAudioSwitch = _localEnterRoomCarAudioSwitch;
- (NSInteger)localEnterRoomCarAudioSwitch{
if (self.enterRoomCarAudioShowSwitch == 1) {
if ([[NSUserDefaults standardUserDefaults] valueForKey:FUSCommonStoreUDKey.fus_enterMotorAudio] != nil) {
return [[[NSUserDefaults standardUserDefaults] valueForKey:FUSCommonStoreUDKey.fus_enterMotorAudio] integerValue];
}else {
return self.enterRoomCarDefaultOption;
}
}else {
return 0;
}
}
- (void)setLocalEnterRoomCarAudioSwitch:(NSInteger)localEnterRoomCarAudioSwitch{
[[NSUserDefaults standardUserDefaults] setValue:[NSString stringWithFormat:@"%ld",localEnterRoomCarAudioSwitch] forKey:FUSCommonStoreUDKey.fus_enterMotorAudio];
}
//嵌套的 model //嵌套的 model
+ (NSDictionary *)modelContainerPropertyGenericClass { + (NSDictionary *)modelContainerPropertyGenericClass {
......
...@@ -5,22 +5,94 @@ ...@@ -5,22 +5,94 @@
// Created by 盘世煜 on 2020/7/2. // Created by 盘世煜 on 2020/7/2.
// Copyright © 2024年 FusiClub. All rights reserved. // Copyright © 2024年 FusiClub. All rights reserved.
// //
//ludy: 改造了监听模式为多播代理,以前仅仅是作为传递作用,注意看一看bug
import UIKit import UIKit
@objc public protocol FUSKeyboardShowHelperDelegate: AnyObject {
func fus_keyboardStatusDidChange(isShow: Bool, keyBoardFrame: CGRect)
}
public class FUSKeyboardShowHelper: NSObject { public class FUSKeyboardShowHelper: NSObject {
@objc public static let sharedInstance = FUSKeyboardShowHelper() @objc public static let sharedInstance = FUSKeyboardShowHelper()
private override init() { private var delegates = NSHashTable<AnyObject>.weakObjects()
}
@objc public var isShow = false ///是否抬起键盘,只读
@objc public var isShow: Bool {
get {
return p_isShow
}
set {
}
}
private var p_isShow = false
@objc public var keyboardFrame = CGRect() ///当前键盘frame,只读
@objc public var keyboardFrame: CGRect {
get {
return p_keyboardFrame
}
set {
}
}
private var p_keyboardFrame = CGRectZero
@objc public var webpMotorContent_Y = 0.0 @objc public var webpMotorContent_Y = 0.0
@objc public var motorContent_Y = 0.0 @objc public var motorContent_Y = 0.0
private override init() {
super.init()
// 监听键盘弹出通知
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
// 监听键盘收回通知
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
}
deinit {
// 移除通知观察者
NotificationCenter.default.removeObserver(self)
}
@objc public func star() {
//没什么意义,只是为了在开始的时候激活一下单利,然后又不让xcode报黄
}
// 添加代理
@objc public func addDelegate(_ delegate: AnyObject) {
delegates.add(delegate)
}
// 移除代理
@objc public func removeDelegate(_ delegate: AnyObject) {
delegates.remove(delegate)
}
// 多播通知代理键盘状态变化
private func notifyDelegates(isShow: Bool, keyBoardFrame: CGRect) {
self.p_keyboardFrame = keyBoardFrame
self.p_isShow = isShow
for delegate in delegates.allObjects {
if let keyboardDelegate = delegate as? FUSKeyboardShowHelperDelegate {
keyboardDelegate.fus_keyboardStatusDidChange(isShow: isShow, keyBoardFrame: keyBoardFrame)
}
}
}
@objc private func keyboardWillShow(_ notification: Notification) {
if let userInfo = notification.userInfo,
let keyboardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue {
// 通知代理键盘弹出
notifyDelegates(isShow: true, keyBoardFrame: keyboardFrame)
}
}
@objc private func keyboardWillHide(_ notification: Notification) {
// 通知代理键盘收回
notifyDelegates(isShow: false, keyBoardFrame: CGRectZero)
}
} }
...@@ -33,6 +33,9 @@ typedef NS_ENUM(NSInteger, AudioOutputType) { ...@@ -33,6 +33,9 @@ typedef NS_ENUM(NSInteger, AudioOutputType) {
// 是否正在播放中 // 是否正在播放中
@property (nonatomic, assign, readonly) BOOL isPlaying; @property (nonatomic, assign, readonly) BOOL isPlaying;
/// 是否正在使用外放
@property (nonatomic, assign, readonly) BOOL isPlayOnSpeaker;
/** /**
创建单例 创建单例
*/ */
......
...@@ -210,6 +210,16 @@ ...@@ -210,6 +210,16 @@
return _player.isPlaying; return _player.isPlaying;
} }
- (BOOL)isPlayOnSpeaker{
AVAudioSessionRouteDescription *currentRoute = AVAudioSession.sharedInstance.currentRoute;
for (AVAudioSessionPortDescription *outPut in currentRoute.outputs) {
if (outPut.portType == AVAudioSessionPortBuiltInSpeaker) {
return YES;
}
}
return NO;
}
#pragma mark - Record #pragma mark - Record
/** /**
开始录音 开始录音
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key> <key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>77</integer> <integer>75</integer>
</dict> </dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key> <key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
......
...@@ -99,6 +99,8 @@ ...@@ -99,6 +99,8 @@
00BA21432D155E69000CC4C9 /* FUSIncomeAgreementAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BA21392D155E69000CC4C9 /* FUSIncomeAgreementAlertView.h */; }; 00BA21432D155E69000CC4C9 /* FUSIncomeAgreementAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BA21392D155E69000CC4C9 /* FUSIncomeAgreementAlertView.h */; };
00BA21442D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BA213D2D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.h */; }; 00BA21442D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BA213D2D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.h */; };
00BA21452D155E69000CC4C9 /* FUSLiveAgreementAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BA213B2D155E69000CC4C9 /* FUSLiveAgreementAlertView.h */; }; 00BA21452D155E69000CC4C9 /* FUSLiveAgreementAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BA213B2D155E69000CC4C9 /* FUSLiveAgreementAlertView.h */; };
00BD441F2D1EAA740099A96F /* FUSCarEnterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 00BD441E2D1EAA740099A96F /* FUSCarEnterView.m */; };
00BD44202D1EAA740099A96F /* FUSCarEnterView.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BD441D2D1EAA740099A96F /* FUSCarEnterView.h */; };
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 */; };
BE189D992C733B450008418B /* FSRActiveMotorEffectModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE189CE72C733B450008418B /* FSRActiveMotorEffectModel.h */; }; BE189D992C733B450008418B /* FSRActiveMotorEffectModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE189CE72C733B450008418B /* FSRActiveMotorEffectModel.h */; };
...@@ -1433,6 +1435,8 @@ ...@@ -1433,6 +1435,8 @@
00BA213C2D155E69000CC4C9 /* FUSLiveAgreementAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveAgreementAlertView.m; sourceTree = "<group>"; }; 00BA213C2D155E69000CC4C9 /* FUSLiveAgreementAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveAgreementAlertView.m; sourceTree = "<group>"; };
00BA213D2D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveAgreementConfirmSectionView.h; sourceTree = "<group>"; }; 00BA213D2D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveAgreementConfirmSectionView.h; sourceTree = "<group>"; };
00BA213E2D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveAgreementConfirmSectionView.m; sourceTree = "<group>"; }; 00BA213E2D155E69000CC4C9 /* FUSLiveAgreementConfirmSectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveAgreementConfirmSectionView.m; sourceTree = "<group>"; };
00BD441D2D1EAA740099A96F /* FUSCarEnterView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSCarEnterView.h; sourceTree = "<group>"; };
00BD441E2D1EAA740099A96F /* FUSCarEnterView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSCarEnterView.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>"; }; 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>"; };
B8B2CC1956F16144828BF43D /* Pods_FUSShowRoomModule.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FUSShowRoomModule.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B8B2CC1956F16144828BF43D /* Pods_FUSShowRoomModule.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FUSShowRoomModule.framework; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -3541,6 +3545,8 @@ ...@@ -3541,6 +3545,8 @@
BED656D82C5B745D00668116 /* FUSLiveScrollView.m */, BED656D82C5B745D00668116 /* FUSLiveScrollView.m */,
BED656D92C5B745D00668116 /* FUSLiveTimeRecordView.h */, BED656D92C5B745D00668116 /* FUSLiveTimeRecordView.h */,
BED656DA2C5B745D00668116 /* FUSLiveTimeRecordView.m */, BED656DA2C5B745D00668116 /* FUSLiveTimeRecordView.m */,
00BD441D2D1EAA740099A96F /* FUSCarEnterView.h */,
00BD441E2D1EAA740099A96F /* FUSCarEnterView.m */,
BED656DB2C5B745D00668116 /* FUSMotorsView.h */, BED656DB2C5B745D00668116 /* FUSMotorsView.h */,
BED656DC2C5B745D00668116 /* FUSMotorsView.m */, BED656DC2C5B745D00668116 /* FUSMotorsView.m */,
BED656DD2C5B745D00668116 /* FUSMotorWEBPView.h */, BED656DD2C5B745D00668116 /* FUSMotorWEBPView.h */,
...@@ -5275,6 +5281,7 @@ ...@@ -5275,6 +5281,7 @@
BED658B92C5B745E00668116 /* FUSHalfWebViewCollectionViewCell.h in Headers */, BED658B92C5B745E00668116 /* FUSHalfWebViewCollectionViewCell.h in Headers */,
BED65AB62C5B745F00668116 /* FUSHomePageViewController.h in Headers */, BED65AB62C5B745F00668116 /* FUSHomePageViewController.h in Headers */,
BED6591D2C5B745E00668116 /* FUSBulletMessageBaseView.h in Headers */, BED6591D2C5B745E00668116 /* FUSBulletMessageBaseView.h in Headers */,
00BD44202D1EAA740099A96F /* FUSCarEnterView.h in Headers */,
BE189DC72C733B460008418B /* FSREnterEffectRoomGuarderViewController.h in Headers */, BE189DC72C733B460008418B /* FSREnterEffectRoomGuarderViewController.h in Headers */,
BED6586D2C5B745E00668116 /* VELPictureInPictureController.h in Headers */, BED6586D2C5B745E00668116 /* VELPictureInPictureController.h in Headers */,
BE189DEB2C733B460008418B /* FSREffectTableViewCell.h in Headers */, BE189DEB2C733B460008418B /* FSREffectTableViewCell.h in Headers */,
...@@ -6258,6 +6265,7 @@ ...@@ -6258,6 +6265,7 @@
BE189DDA2C733B460008418B /* FSRPKViewController.m in Sources */, BE189DDA2C733B460008418B /* FSRPKViewController.m in Sources */,
BED659DF2C5B745F00668116 /* FUSPKStyleModel.m in Sources */, BED659DF2C5B745F00668116 /* FUSPKStyleModel.m in Sources */,
BED65A762C5B745F00668116 /* FUSWarningView.m in Sources */, BED65A762C5B745F00668116 /* FUSWarningView.m in Sources */,
00BD441F2D1EAA740099A96F /* FUSCarEnterView.m in Sources */,
BED658C32C5B745E00668116 /* FUSProgressActivityView.m in Sources */, BED658C32C5B745E00668116 /* FUSProgressActivityView.m in Sources */,
BED65A9D2C5B745F00668116 /* FUSShowBroadcastGuideAlertView.m in Sources */, BED65A9D2C5B745F00668116 /* FUSShowBroadcastGuideAlertView.m in Sources */,
BED65ADC2C5B746000668116 /* FUSBaoFangAnchorModel.m in Sources */, BED65ADC2C5B746000668116 /* FUSBaoFangAnchorModel.m in Sources */,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key> <key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>76</integer> <integer>74</integer>
</dict> </dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key> <key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict> <dict>
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_enter_room_normal399_70@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -60,6 +60,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -60,6 +60,9 @@ NS_ASSUME_NONNULL_BEGIN
// 是否自己闭的麦 // 是否自己闭的麦
@property (nonatomic, assign) BOOL selfCloseMic; @property (nonatomic, assign) BOOL selfCloseMic;
/// 自己是否在麦上
@property (nonatomic, assign, readonly) BOOL selfOnMicList;
//view的数量 //view的数量
@property (nonatomic, assign) NSInteger viewAmount; @property (nonatomic, assign) NSInteger viewAmount;
......
...@@ -1331,6 +1331,15 @@ ...@@ -1331,6 +1331,15 @@
return _emptyModel; return _emptyModel;
} }
- (BOOL)selfOnMicList{
for (FUSLinkMicroModel *model in self.models) {
if (model.uid == [FUSCacheDataShare shareStore].userDetailInfo.uid) {
return YES;
}
}
return NO;
}
#pragma mark - setter #pragma mark - setter
/// 本地音频静音 /// 本地音频静音
......
//
// FUSCarEnterView.h
// LiveRoom
//
// Created by aaa on 2023/9/25.
//
#import <UIKit/UIKit.h>
#import "FUSLiveChatInputTextView.h"
#define CONTENTLABEL_HEIGHT 25
#define BASELEVLE_CAR_WIDTH 120/2.0f
#define BOTTOM_MARGIN (UIView.fus_SafeBottom + CHAT_TEXT_INPUT_PART_HEIGHT)
#define CONTENTVIEW_HEIGHT BASELEVLE_CAR_WIDTH * 8
NS_ASSUME_NONNULL_BEGIN
@interface FUSCarEnterView : UIView
/**
动画结束回调
*/
@property (nonatomic, copy) void(^animationDidEnd)(UIView *animatingView);
/**
点击回调
*/
@property (nonatomic, copy) void(^tapContentHandler)(FUSRoomUserInfoModel *model);
///播放中的座驾信息
@property (nonatomic, strong) FUSMotorDataModel *motorModel;
/**
是否正在动画中
*/
@property (nonatomic, assign) BOOL isAnimating;
/**
开始进场动画
*/
- (void)fus_startEnterAnimation;
/**
停止动画
*/
- (void)fus_stopAnimation;
/// 设置下座驾下面的偏移量
-(void)fus_setCarBottomOffset:(CGFloat)carBottomOffset withAnimate:(BOOL)animate;
/// 根据座驾设置view
/// - Parameters:
/// - mid: mid 座驾 ID
/// - tipAttr: 富文本:xxx开着xxx来了
/// - ishidden: 是否是隐身用户
/// - uid: uid
- (void)fus_setupMotorsViewWithMid:(NSString *)mid
tipAttr:(NSMutableAttributedString *)tipAttr
ishidden:(BOOL)ishidden
level:(NSString *)level
imageURL:(NSString *)imageURL
uid:(NSString *)uid;
/**
根据 tip 异步线程创建富文本,complete已经返回主线程
*/
+ (void)fus_attributedContentForDataict:(NSDictionary *)dataDict
complete:(void(^)(NSMutableAttributedString *attributedString))complete;
@end
NS_ASSUME_NONNULL_END
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
- (void)fus_restContentY:(CGRect)keyboardFrame{ - (void)fus_restContentY:(CGRect)keyboardFrame{
CGFloat keyboardHeight = keyboardFrame.size.height; CGFloat keyboardHeight = keyboardFrame.size.height;
[FUSKeyboardShowHelper sharedInstance].keyboardFrame = keyboardFrame; // [FUSKeyboardShowHelper sharedInstance].keyboardFrame = keyboardFrame;
CGFloat animationMovementOnKeyboardShow = self.height - self.contentView.y - keyboardHeight - BULLETS_LIST_HEIGHT - self.contentView.height - 10; CGFloat animationMovementOnKeyboardShow = self.height - self.contentView.y - keyboardHeight - BULLETS_LIST_HEIGHT - self.contentView.height - 10;
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
return; return;
} }
[FUSKeyboardShowHelper sharedInstance].isShow = YES; // [FUSKeyboardShowHelper sharedInstance].isShow = YES;
[UIView animateWithDuration:.35 animations:^{ [UIView animateWithDuration:.35 animations:^{
...@@ -353,7 +353,7 @@ ...@@ -353,7 +353,7 @@
// 接收键盘收回通知 // 接收键盘收回通知
- (void)recieveKeyboardWillHideNotification:(NSNotification *)notification - (void)recieveKeyboardWillHideNotification:(NSNotification *)notification
{ {
[FUSKeyboardShowHelper sharedInstance].isShow = false; // [FUSKeyboardShowHelper sharedInstance].isShow = false;
[UIView animateWithDuration:.35 animations:^{ [UIView animateWithDuration:.35 animations:^{
if (@available(iOS 11.0, *)) { if (@available(iOS 11.0, *)) {
......
...@@ -658,7 +658,7 @@ ...@@ -658,7 +658,7 @@
- (void)fus_restContentY:(CGRect)keyboardFrame{ - (void)fus_restContentY:(CGRect)keyboardFrame{
CGFloat keyboardHeight = keyboardFrame.size.height; CGFloat keyboardHeight = keyboardFrame.size.height;
[FUSKeyboardShowHelper sharedInstance].keyboardFrame = keyboardFrame; // [FUSKeyboardShowHelper sharedInstance].keyboardFrame = keyboardFrame;
CGFloat animationMovementOnKeyboardShow = self.y - self.height - 10 - keyboardHeight; CGFloat animationMovementOnKeyboardShow = self.y - self.height - 10 - keyboardHeight;
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
return; return;
} }
[FUSKeyboardShowHelper sharedInstance].isShow = YES; // [FUSKeyboardShowHelper sharedInstance].isShow = YES;
[UIView animateWithDuration:.35 animations:^{ [UIView animateWithDuration:.35 animations:^{
...@@ -695,7 +695,7 @@ ...@@ -695,7 +695,7 @@
// 接收键盘收回通知 // 接收键盘收回通知
- (void)recieveKeyboardWillHideNotification:(NSNotification *)notification - (void)recieveKeyboardWillHideNotification:(NSNotification *)notification
{ {
[FUSKeyboardShowHelper sharedInstance].isShow = false; // [FUSKeyboardShowHelper sharedInstance].isShow = false;
[UIView animateWithDuration:.35 animations:^{ [UIView animateWithDuration:.35 animations:^{
......
...@@ -68,6 +68,10 @@ ...@@ -68,6 +68,10 @@
return [FUSLiveHelper shareInstance].currentFunctionView.linkMicroView.micListArr.count > 0; return [FUSLiveHelper shareInstance].currentFunctionView.linkMicroView.micListArr.count > 0;
} }
- (BOOL)selfOnMicList{
return [FUSLiveHelper shareInstance].currentFunctionView.linkMicroView.selfOnMicList;
}
- (BOOL)isRoomVisable { - (BOOL)isRoomVisable {
return [FUSLiveHelper shareInstance].isRoomVisable; return [FUSLiveHelper shareInstance].isRoomVisable;
} }
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key> <key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>74</integer> <integer>76</integer>
</dict> </dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key> <key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>75</integer> <integer>77</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
- (void)keyBoardWillChangeFrame:(NSNotification*)notification{ - (void)keyBoardWillChangeFrame:(NSNotification*)notification{
CGRect frame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; CGRect frame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
[FUSKeyboardShowHelper sharedInstance].keyboardFrame = frame; // [FUSKeyboardShowHelper sharedInstance].keyboardFrame = frame;
CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
CGFloat toolBarHeight = self.replyInputView.frame.size.height; CGFloat toolBarHeight = self.replyInputView.frame.size.height;
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
- (void)keyBoardWillHideChangeFrame:(NSNotification*)notification{ - (void)keyBoardWillHideChangeFrame:(NSNotification*)notification{
[FUSKeyboardShowHelper sharedInstance].keyboardFrame = CGRectZero; // [FUSKeyboardShowHelper sharedInstance].keyboardFrame = CGRectZero;
CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
[UIView animateWithDuration:duration animations:^{ [UIView animateWithDuration:duration animations:^{
......
...@@ -553,6 +553,8 @@ ...@@ -553,6 +553,8 @@
// 请求sh状态 // 请求sh状态
[self checkAppStatus]; [self checkAppStatus];
[[FUSKeyboardShowHelper sharedInstance] star];
return YES; return YES;
} }
......
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