Determening MPMovieController bit-rate

后端 未结 2 1193
北恋
北恋 2021-01-14 18:19

Is there a way to determine the bit-rate of the stream an MPMovieController is playing? I am programming in objective-c on iOS

2条回答
  •  旧时难觅i
    2021-01-14 18:28

    Found it, the "accessLog" gives you periodic stats which include the observed bitrate:

    MPMovieAccessLogEvent *evt=nil;
    MPMovieAccessLog *accessL=[moviePlayer accessLog];
    NSArray *events = accessL.events;
    for (int i=0; i<[events count]; i++) {
        evt=[events objectAtIndex:i];
    }
    return evt.observedBitrate
    

提交回复
热议问题