...
|
...
|
@@ -1213,71 +1213,71 @@ |
|
|
|
|
|
/// 左边 悬浮按钮 - 回放
|
|
|
- (void)aliveReplay {
|
|
|
MJWeakSelf
|
|
|
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:self.listModel.sourceID,@"id",nil];
|
|
|
[[CSHTTPSessionManager sharedManager]aliveSourceDetailCommitDataWithParams:dic success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
|
|
|
NSLog(@"%@",responseObject);
|
|
|
NSInteger code = [responseObject[@"code"] intValue];
|
|
|
if (code == 1 ) {
|
|
|
|
|
|
NSString *channid = responseObject[@"data"][@"channel_id"];
|
|
|
NSString *vid = responseObject[@"data"][@"vid"];
|
|
|
|
|
|
if ([vid isEqualToString:@""]) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
[PLVRoomLoginClient
|
|
|
loginLiveRoomWithChannelType:PLVChannelTypeAlone channelId:channid userId:BLV_USER_ID appId:BLV_APP_ID appSecret:BLV_APP_ST roomUser:^(PLVRoomUser * _Nonnull roomUser) {
|
|
|
|
|
|
} completion:^(PLVViewLogCustomParam * _Nonnull customParam) {
|
|
|
|
|
|
|
|
|
|
|
|
PLVLCCloudClassViewController *vc = [[PLVLCCloudClassViewController alloc]init];
|
|
|
[weakSelf.navigationController pushViewController:vc animated:YES];
|
|
|
|
|
|
|
|
|
} failure:^(NSString * _Nonnull errorMessage) {
|
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
} else {
|
|
|
// 需要处理token失效的问题
|
|
|
NSString * msg = responseObject[@"msg"];
|
|
|
[MBProgressHUD showMessageOnlyCenter:msg view:weakSelf.view];
|
|
|
|
|
|
}
|
|
|
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
|
|
|
NSLog(@"aliveSourceDetailCommitDataWithParams%@",error);
|
|
|
}];
|
|
|
// MJWeakSelf
|
|
|
// NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:self.listModel.sourceID,@"id",nil];
|
|
|
// [[CSHTTPSessionManager sharedManager]aliveSourceDetailCommitDataWithParams:dic success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
|
|
|
// NSLog(@"%@",responseObject);
|
|
|
// NSInteger code = [responseObject[@"code"] intValue];
|
|
|
// if (code == 1 ) {
|
|
|
//
|
|
|
// NSString *channid = responseObject[@"data"][@"channel_id"];
|
|
|
// NSString *vid = responseObject[@"data"][@"vid"];
|
|
|
//
|
|
|
// if ([vid isEqualToString:@""]) {
|
|
|
// return;
|
|
|
// }
|
|
|
//
|
|
|
// [PLVRoomLoginClient
|
|
|
// loginLiveRoomWithChannelType:PLVChannelTypeAlone channelId:channid userId:BLV_USER_ID appId:BLV_APP_ID appSecret:BLV_APP_ST roomUser:^(PLVRoomUser * _Nonnull roomUser) {
|
|
|
//
|
|
|
// } completion:^(PLVViewLogCustomParam * _Nonnull customParam) {
|
|
|
//
|
|
|
//
|
|
|
//
|
|
|
// PLVLCCloudClassViewController *vc = [[PLVLCCloudClassViewController alloc]init];
|
|
|
// [weakSelf.navigationController pushViewController:vc animated:YES];
|
|
|
//
|
|
|
//
|
|
|
// } failure:^(NSString * _Nonnull errorMessage) {
|
|
|
//
|
|
|
// }];
|
|
|
//
|
|
|
//
|
|
|
// } else {
|
|
|
// // 需要处理token失效的问题
|
|
|
// NSString * msg = responseObject[@"msg"];
|
|
|
// [MBProgressHUD showMessageOnlyCenter:msg view:weakSelf.view];
|
|
|
//
|
|
|
// }
|
|
|
// } failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
|
|
|
// NSLog(@"aliveSourceDetailCommitDataWithParams%@",error);
|
|
|
// }];
|
|
|
|
|
|
|
|
|
|
|
|
// MJWeakSelf
|
|
|
// ECLiveViewController *vc = [ECLiveViewController new];
|
|
|
// NSDictionary *dic = @{@"token":userToken,
|
|
|
// @"id":self.listModel.sourceID
|
|
|
// };
|
|
|
// [[CSHTTPSessionManager sharedManager]replayAliveSourceDetailCommitDataWithParams:dic success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
|
|
|
// NSLog(@"%@",responseObject);
|
|
|
// NSInteger code = [responseObject[@"code"] intValue];
|
|
|
// if (code == 1 ) {
|
|
|
//
|
|
|
// NSDictionary *dic = responseObject[@"data"];
|
|
|
// vc.liveURL = dic[@"url"];
|
|
|
// [weakSelf.navigationController pushViewController:vc animated:YES];
|
|
|
// //
|
|
|
// } else {
|
|
|
// // 需要处理token失效的问题
|
|
|
// NSString * msg = responseObject[@"msg"];
|
|
|
// [MBProgressHUD showMessageOnlyCenter:msg view:weakSelf.view];
|
|
|
//
|
|
|
// }
|
|
|
// } failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
|
|
|
// NSLog(@"replayAliveSourceDetailCommitDataWithParams%@",error);
|
|
|
// }];
|
|
|
MJWeakSelf
|
|
|
ECLiveViewController *vc = [ECLiveViewController new];
|
|
|
NSDictionary *dic = @{@"token":userToken,
|
|
|
@"id":self.listModel.sourceID
|
|
|
};
|
|
|
[[CSHTTPSessionManager sharedManager]replayAliveSourceDetailCommitDataWithParams:dic success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
|
|
|
NSLog(@"%@",responseObject);
|
|
|
NSInteger code = [responseObject[@"code"] intValue];
|
|
|
if (code == 1 ) {
|
|
|
|
|
|
NSDictionary *dic = responseObject[@"data"];
|
|
|
vc.liveURL = dic[@"url"];
|
|
|
[weakSelf.navigationController pushViewController:vc animated:YES];
|
|
|
//
|
|
|
} else {
|
|
|
// 需要处理token失效的问题
|
|
|
NSString * msg = responseObject[@"msg"];
|
|
|
[MBProgressHUD showMessageOnlyCenter:msg view:weakSelf.view];
|
|
|
|
|
|
}
|
|
|
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
|
|
|
NSLog(@"replayAliveSourceDetailCommitDataWithParams%@",error);
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
- (void)alive {
|
...
|
...
|
|