AVPlayerItemAccessLogEvent总是为零

时间:2013-10-23 13:00:13

标签: ios objective-c xcode avplayer

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

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

即使我收到AVPlayerStatusReadyToPlay AVPlayerItemAccessLogEventnil 事件

  

AVPlayerItemAccessLogEvent * nil 0x00000000

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

0 个答案:

没有答案
相关问题