1

我正在使用 AVPlayer 流式传输音频并尝试使用此代码示例来确定流的当前比特率。

NSArray *logEvents=playerItem.accessLog.events;
AVPlayerItemAccessLogEvent *event = (AVPlayerItemAccessLogEvent *)[logEvents lastObject];
double bitRate=event.observedBitrate;

即使在我得到我AVPlayerStatusReadyToPlay AVPlayerItemAccessLogEventnil 事件 之后

AVPlayerItemAccessLogEvent * nil 0x00000000

经过一段时间的流式传输后,我尝试设置计时器并检查 accessLog ,但仍然得到nil.

4

0 回答 0