开发者

MPMoviePlayerController - how to tell what bitrate is playing?

开发者 https://www.devze.com 2023-04-06 01:16 出处:网络
The HTTP Live Streaming format supports variable bitrates, which are described in the m3u8 file. I开发者_开发百科s it possible to get the bitrate of the currently playing stream?No, you can\'t get th

The HTTP Live Streaming format supports variable bitrates, which are described in the m3u8 file.

I开发者_开发百科s it possible to get the bitrate of the currently playing stream?


No, you can't get that information from MPMoviePlayerController

To get the information you want, you could use AVPlayer and AVPlayerItems, which will then create AVAsset items that you can interrogate to discover their properties.

Once you have a AVPlayer, you can find the current AVPlayerItem using currentItem. From that, you can get the asset property.

A AVAsset has AVAssetTracks and this has the formatDescriptions property. Somewhere in there you should find the bitrate.

0

精彩评论

暂无评论...
验证码 换一张
取 消