Commit 566e92fc by suolong

解决开播问题

parent e3b71d54
......@@ -392,7 +392,7 @@ typedef NS_ENUM(NSInteger,FUSLiveRoomScopeType) {
- (void)fus_quitRoom;
/// 请求rtc数据
-(void)fus_getRTCData;
- (void)fus_getRTCDataWithForceUpdate:(BOOL)forceUpdate;
#warning debugInfo
......
......@@ -93,6 +93,8 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
NSDictionary *bytedance = [NSUserDefaults.standardUserDefaults objectForKey:LIVE_PUSH_CONFIG];
if (bytedance) {
self.livePushConfig = [FUSStreamPushConfigModel fus_modelWithDict:bytedance];
self.livePushConfig.agoraAppKey = FUSConfig.sharedInstanced.sdkConfigs.agoraKey;
self.livePushConfig.byteRTCAppKey = FUSConfig.sharedInstanced.sdkConfigs.byteRTCKey;
}
[self registerNotification];
......@@ -102,15 +104,16 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
}
#pragma mark - 获取rtcData
- (void)fus_getRTCData
- (void)fus_getRTCDataWithForceUpdate:(BOOL)forceUpdate
{
[FUSLiveHttpHelper fus_requestliveGetRTCData:[FUSCacheDataShare shareStore].userDetailInfo.uid Success:^(NSDictionary * _Nonnull dataDict) {
if (FUSLiveHelper.shareInstance.liveRTCData == nil) {
FUSLiveHelper.shareInstance.liveRTCData = [FUSLiveRTCData createFromArchieveWithKey:KLiveDataCenter_store_liveRTCData];
FUSLiveRTCData *data = [FUSLiveRTCData createFromArchieveWithKey:KLiveDataCenter_store_liveRTCData];
FUSLiveHelper.shareInstance.liveRTCData = data;
}
if ([FUSLiveHelper.shareInstance.liveRTCData fus_hasExpire] == true) {
if ([FUSLiveHelper.shareInstance.liveRTCData fus_hasExpire] == true || forceUpdate) {
FUSLiveRTCData *data = [FUSLiveRTCData getDataTurnModelWithKey:dataDict];
FUSLiveHelper.shareInstance.liveRTCData = data;
[data fus_cacheToArchieveWithKey:KLiveDataCenter_store_liveRTCData];
......@@ -1800,6 +1803,8 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
NSDictionary *bytedance = liveData[@"bytedance"];
if (bytedance) {
self.livePushConfig = [FUSStreamPushConfigModel fus_modelWithDict:bytedance];
self.livePushConfig.agoraAppKey = FUSConfig.sharedInstanced.sdkConfigs.agoraKey;
self.livePushConfig.byteRTCAppKey = FUSConfig.sharedInstanced.sdkConfigs.byteRTCKey;
self.livePushConfig.captureType = FUSStreamCaptureTypeSingleStream;
//TODO: ludy: 这里修改了,注意一下bdurlmd5这些有没有
FUSDownloadResourceModel *downloadModel = [[FUSDownloadResourceModel alloc] init];
......
......@@ -241,7 +241,7 @@
[FUSTreasureBoxHttpHelper fus_updateRedPackageResources];
/// 拉取rtc信息
[[FUSLiveHelper shareInstance] fus_getRTCData];
[[FUSLiveHelper shareInstance] fus_getRTCDataWithForceUpdate:YES];
[FUSLiveHttpHelper fus_requestLiveGameListSuccess:^(NSArray<FUSLiveGameModel *> *gameList) {
[FUSLiveConfigsDataCenter shareInstance].gameList = gameList;
......
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