Commit cf41be93 by suolong

补充下 正常开播

parent f4c2941f
......@@ -632,59 +632,59 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
_pushView = _streamView.pushView;
// 调用推拉流 View 开始推流
__weak typeof(self) weakSelf = self;
//TODO: 索隆 - V57
// [_streamView.pushView fus_startPushWithURL:[FUSLiveHelper shareInstance].streamModel.url success:^{
//
// //服务器启动推流
// [FUSLiveHttpHelper fus_startPushStreamWithRoomId:[[[FUSLiveHelper shareInstance] roomInfoModel] roomId] vdoid:[[[FUSLiveHelper shareInstance] streamModel] vdoid] livingWay:@"0" liveScope:[FUSLiveHelper shareInstance].roomScopeType success:^(NSDictionary *dict){
//
// // [self initWaterMark];
// [FUSLiveHelper shareInstance].roomInfoModel.channelId = [dict[@"channelId"] description];
//
// [FUSLiveHelper shareInstance].roomInfoModel.stateSwitch = [FUSLiveRoomStateSwitchModel modelWithDictionary:dict[@"stateSwitch"]];
// [FUSCacheDataShare shareStore].userBanScreenShot = [FUSLiveHelper shareInstance].roomInfoModel.stateSwitch.screenshotState;
//
// if (FUSConfig.sharedInstanced.devConfigs.enableTestCode) {
// [FUSDialogView fus_showDialog:[NSString stringWithFormat:@"测试:%@",[FUSLiveHelper shareInstance].roomInfoModel.channelId]];
// }
//
//// [[FUSLiveHelper shareInstance].currentFunctionView fus_refreshChatBtnWithPKState:[dict[@"isShowPk"] description]];
// [[NSNotificationCenter defaultCenter] postNotificationName:FUSLiveNotificationKeys.fus_FUS_LIVE_ROOM_SHOW_PKBTN object:[dict[@"isShowPk"] description]];
//
// [[FUSLiveHelper shareInstance].currentFunctionView fus_startRecordLiveTimeWithTime:[dict[@"livetime"] description]];
//
// // 调用主播加入直播间
// [weakSelf fus_enterRoom];
//
// [FUSLiveHelper shareInstance].isStartedLive = YES;
//
// // 更新直播状态
// [FUSLiveHttpHelper fus_changeLiveStateWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId state:@"0" success:nil failure:nil];
// [FUSLiveHelper shareInstance].roomInfoModel.channelId = [dict[@"channelId"] description];
//
// if (FUSConfig.sharedInstanced.devConfigs.enableTestCode) {
// [FUSDialogView fus_showDialog:[NSString stringWithFormat:@"测试:%@",[FUSLiveHelper shareInstance].roomInfoModel.channelId]];
// }
//
// [[NSNotificationCenter defaultCenter] postNotificationName:FUSLiveUDKeys.fus_IS_JOIN_ROOM_SUCCESS object:nil];
//
// } failure:^(NSString *msg, int code) {
// if (FUSConfig.sharedInstanced.liveConfigs.isAnchor) {
// [FUSAlertView showAlertWithTitle:nil message:msg cancelButtonTitle:[NSString fus_localString:@"确定"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {}];
// }
// }];
//
// } failure:^{
//
// if ([FUSLiveHelper shareInstance].roomInfoModel.roomId) {
//
// // 弹出失败提示框
// [FUSAlertView showAlertWithTitle:nil message:[NSString fus_localString:@"发生错误,请重新开播"] cancelButtonTitle:[NSString fus_localString:@"确定"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {
// [weakSelf fus_endPush];
// }];
// }
//
// }];
//TODO: 索隆 - V57 mixurl没有
[_streamView.pushView fus_startPushWithURL:[FUSLiveHelper shareInstance].streamModel.url andMixUrl:@"" success:^{
//服务器启动推流
[FUSLiveHttpHelper fus_startPushStreamWithRoomId:[[[FUSLiveHelper shareInstance] roomInfoModel] roomId] vdoid:[[[FUSLiveHelper shareInstance] streamModel] vdoid] livingWay:@"0" liveScope:[FUSLiveHelper shareInstance].roomScopeType success:^(NSDictionary *dict){
// [self initWaterMark];
[FUSLiveHelper shareInstance].roomInfoModel.channelId = [dict[@"channelId"] description];
[FUSLiveHelper shareInstance].roomInfoModel.stateSwitch = [FUSLiveRoomStateSwitchModel modelWithDictionary:dict[@"stateSwitch"]];
[FUSCacheDataShare shareStore].userBanScreenShot = [FUSLiveHelper shareInstance].roomInfoModel.stateSwitch.screenshotState;
if (FUSConfig.sharedInstanced.devConfigs.enableTestCode) {
[FUSDialogView fus_showDialog:[NSString stringWithFormat:@"测试:%@",[FUSLiveHelper shareInstance].roomInfoModel.channelId]];
}
// [[FUSLiveHelper shareInstance].currentFunctionView fus_refreshChatBtnWithPKState:[dict[@"isShowPk"] description]];
[[NSNotificationCenter defaultCenter] postNotificationName:FUSLiveNotificationKeys.fus_FUS_LIVE_ROOM_SHOW_PKBTN object:[dict[@"isShowPk"] description]];
[[FUSLiveHelper shareInstance].currentFunctionView fus_startRecordLiveTimeWithTime:[dict[@"livetime"] description]];
// 调用主播加入直播间
[weakSelf fus_enterRoom];
[FUSLiveHelper shareInstance].isStartedLive = YES;
// 更新直播状态
[FUSLiveHttpHelper fus_changeLiveStateWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId state:@"0" success:nil failure:nil];
[FUSLiveHelper shareInstance].roomInfoModel.channelId = [dict[@"channelId"] description];
if (FUSConfig.sharedInstanced.devConfigs.enableTestCode) {
[FUSDialogView fus_showDialog:[NSString stringWithFormat:@"测试:%@",[FUSLiveHelper shareInstance].roomInfoModel.channelId]];
}
[[NSNotificationCenter defaultCenter] postNotificationName:FUSLiveUDKeys.fus_IS_JOIN_ROOM_SUCCESS object:nil];
} failure:^(NSString *msg, int code) {
if (FUSConfig.sharedInstanced.liveConfigs.isAnchor) {
[FUSAlertView showAlertWithTitle:nil message:msg cancelButtonTitle:[NSString fus_localString:@"确定"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {}];
}
}];
} failure:^{
if ([FUSLiveHelper shareInstance].roomInfoModel.roomId) {
// 弹出失败提示框
[FUSAlertView showAlertWithTitle:nil message:[NSString fus_localString:@"发生错误,请重新开播"] cancelButtonTitle:[NSString fus_localString:@"确定"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {
[weakSelf fus_endPush];
}];
}
}];
[self initLiveFunctionView];
}
......
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