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 | 28 | |
| 29 | 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 | 33 | #pragma mark - 公共方法 |
| 34 | 34 | // 获取播放地址 | ... | ... |
CNLivePlayer/Classes/DataRequest/CNLivePlayerRequest.m
| ... | ... | @@ -95,10 +95,11 @@ |
| 95 | 95 | |
| 96 | 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 | 99 | NSDictionary *parameter = @{@"appId": Player_AppID, |
| 100 | - @"channelId": channelId ? channelId : @"", | |
| 101 | 100 | @"activityId": activityId ? activityId : @"", |
| 101 | + @"channelId": channelId ? channelId : @"", | |
| 102 | + @"rate": rate ? rate : @"2", | |
| 102 | 103 | @"timestamp": [self getTimestamp], |
| 103 | 104 | @"isHLS": @"1", |
| 104 | 105 | @"plat": @"i", | ... | ... |
CNLivePlayer/Classes/Player/CNLivePlayer.m
| ... | ... | @@ -324,7 +324,7 @@ |
| 324 | 324 | }else if([_type isEqualToString:@"live"]){ |
| 325 | 325 | //直播播放地址 |
| 326 | 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 | 328 | __strong typeof(weakSelf) strongSelf = weakSelf; |
| 329 | 329 | if(!strongSelf){ |
| 330 | 330 | return ; | ... | ... |