Skip to content

Commit

Permalink
feat(iOS): add SetDefaultBandWidth interface
Browse files Browse the repository at this point in the history
  • Loading branch information
skufly committed Mar 20, 2020
1 parent d6a5297 commit c871d21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions platform/Apple/source/CicadaPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,16 @@ OBJC_EXPORT
*/
-(NSString *) getPropertyString:(CicadaPropertyKey)key;

/**
@brief 设置多码率时默认播放的码率。将会选择与之最接近的一路流播放。
@param bandWidth 播放的码率。
*/
/****
@brief Set the default playback bitrate for multi-bit rate. The nearest stream will be selected.
@param bandWidth bit rate .
*/
-(void) setDefaultBandWidth:(int)bandWidth;

/**
@brief 获取SDK版本号信息
*/
Expand Down
7 changes: 7 additions & 0 deletions platform/Apple/source/CicadaPlayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,13 @@ -(NSString *) getPropertyString:(CicadaPropertyKey)key
return @"";
}

-(void) setDefaultBandWidth:(int)bandWidth
{
if (self.player) {
self.player->SetDefaultBandWidth(bandWidth);
}
}

+ (NSString *) getSDKVersion
{
string version = MediaPlayer::GetSdkVersion();
Expand Down

0 comments on commit c871d21

Please sign in to comment.