diff --git a/platform/Apple/source/CicadaPlayer.h b/platform/Apple/source/CicadaPlayer.h index 65508a8d8..4f97f3df8 100644 --- a/platform/Apple/source/CicadaPlayer.h +++ b/platform/Apple/source/CicadaPlayer.h @@ -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版本号信息 */ diff --git a/platform/Apple/source/CicadaPlayer.mm b/platform/Apple/source/CicadaPlayer.mm index b44e347f4..0ed83bcbc 100644 --- a/platform/Apple/source/CicadaPlayer.mm +++ b/platform/Apple/source/CicadaPlayer.mm @@ -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();