Commit 3f467ab3457f4bf106559cc2db7f113507b2ea03
1 parent
694d74e5
no message
Showing
3 changed files
with
5 additions
and
4 deletions
CNLivePlayer/Classes/DataRequest/CNLivePlayerRequest.h
| @@ -28,7 +28,7 @@ typedef void (^ResultsBlock) (NSString * _Nullable videoUrl, NSError * _Nullable | @@ -28,7 +28,7 @@ typedef void (^ResultsBlock) (NSString * _Nullable videoUrl, NSError * _Nullable | ||
| 28 | 28 | ||
| 29 | #pragma mark - 直播 | 29 | #pragma mark - 直播 |
| 30 | // 获取直播播放地址 | 30 | // 获取直播播放地址 |
| 31 | -+ (void)getLiveVideoURLWithActivityId:(NSString *)activityId channelId:(NSString *)channelId block:(nullable ResultsBlock)block; | 31 | ++ (void)getLiveVideoURLWithActivityId:(NSString *)activityId channelId:(NSString *)channelId rate:(NSString *)rate block:(nullable ResultsBlock)block; |
| 32 | 32 | ||
| 33 | #pragma mark - 公共方法 | 33 | #pragma mark - 公共方法 |
| 34 | // 获取播放地址 | 34 | // 获取播放地址 |
CNLivePlayer/Classes/DataRequest/CNLivePlayerRequest.m
| @@ -95,10 +95,11 @@ | @@ -95,10 +95,11 @@ | ||
| 95 | 95 | ||
| 96 | #pragma mark - 直播 | 96 | #pragma mark - 直播 |
| 97 | // 获取直播播放地址 | 97 | // 获取直播播放地址 |
| 98 | -+ (void)getLiveVideoURLWithActivityId:(NSString *)activityId channelId:(NSString *)channelId block:(nullable ResultsBlock)block { | 98 | ++ (void)getLiveVideoURLWithActivityId:(NSString *)activityId channelId:(NSString *)channelId rate:(NSString *)rate block:(nullable ResultsBlock)block { |
| 99 | NSDictionary *parameter = @{@"appId": Player_AppID, | 99 | NSDictionary *parameter = @{@"appId": Player_AppID, |
| 100 | - @"channelId": channelId ? channelId : @"", | ||
| 101 | @"activityId": activityId ? activityId : @"", | 100 | @"activityId": activityId ? activityId : @"", |
| 101 | + @"channelId": channelId ? channelId : @"", | ||
| 102 | + @"rate": rate ? rate : @"2", | ||
| 102 | @"timestamp": [self getTimestamp], | 103 | @"timestamp": [self getTimestamp], |
| 103 | @"isHLS": @"1", | 104 | @"isHLS": @"1", |
| 104 | @"plat": @"i", | 105 | @"plat": @"i", |
CNLivePlayer/Classes/Player/CNLivePlayer.m
| @@ -324,7 +324,7 @@ | @@ -324,7 +324,7 @@ | ||
| 324 | }else if([_type isEqualToString:@"live"]){ | 324 | }else if([_type isEqualToString:@"live"]){ |
| 325 | //直播播放地址 | 325 | //直播播放地址 |
| 326 | __weak typeof(self) weakSelf = self; | 326 | __weak typeof(self) weakSelf = self; |
| 327 | - [CNLivePlayerRequest getLiveVideoURLWithActivityId:_activityId channelId:_channelId block:^(NSString * _Nonnull videoUrl, NSError *error) { | 327 | + [CNLivePlayerRequest getLiveVideoURLWithActivityId:_activityId channelId:_channelId rate:_rate block:^(NSString * _Nonnull videoUrl, NSError *error) { |
| 328 | __strong typeof(weakSelf) strongSelf = weakSelf; | 328 | __strong typeof(weakSelf) strongSelf = weakSelf; |
| 329 | if(!strongSelf){ | 329 | if(!strongSelf){ |
| 330 | return ; | 330 | return ; |