ios - Unable to get tracks of AVAsset using HLS while retrieveing bitrate -
i using hls streaming in application , using avplayer. want bitrate of video track using avasset. although have added observer , other stuff getting tracks array empty always.am on right track or missing anything?
hls adaptive, therefore, bitrate can vary across duration of stream based on various conditions. on wrong track, unlike playing file, either local or network url, currentitem.asset.tracks nil.
you'll need query avplayer's currentitem's accesslog , inspect appropriate "events".
the following documentation should give information need;
look @ ;
and
edit:
you might benefit reading apple's live streaming overview give better understanding of .m3u8 index files, media file can encoded various bit rates accommodate different network throughput/congestion. client responsible switching between segments encoded @ different bit rates.
the observedminbitrate , observedmaxbitrate properties you'll find useful, withought knowing intended use, it's hart if suffice. keep in mind also, per docs, these per segment (refer overview better understanding of segment).
Comments
Post a Comment