Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTTP Live Streaming 格式支持可变比特率,在 m3u8 文件中进行了描述。
是否可以获得当前播放流的比特率?
不,您无法从 MPMoviePlayerController 获取该信息
要获取您想要的信息,您可以使用 AVPlayer 和 AVPlayerItems,然后它们将创建 AVAsset 项目,您可以查询这些项目以发现它们的属性。
拥有 AVPlayer 后,您可以使用currentItem. 从那里,你可以得到asset财产。
currentItem
asset
AAVAsset有AVAssetTracks 并且 this 有formatDescriptions属性。在那里的某个地方你应该找到比特率。
AVAsset
AVAssetTrack
formatDescriptions