如何获取 MPMoviePlayer 的当前缓冲区长度
How can I get current buffer length of MPMoviePlayer
如何在 秒 内获取 MpMoviePlayer 当前的缓冲长度?
这个link描述了如何以字节为单位获取它,但我需要将它转换为秒。
有什么办法可以做到吗?
您可以访问 playableDuration
属性 的 MPMoviePlayerController
。
根据Apple Docs,
The amount of currently playable content. (read-only)
Declaration
@property(nonatomic, readonly) NSTimeInterval playableDuration
Discussion
For progressively downloaded network
content, this property reflects the amount of content that can be
played now.
如何在 秒 内获取 MpMoviePlayer 当前的缓冲长度? 这个link描述了如何以字节为单位获取它,但我需要将它转换为秒。
有什么办法可以做到吗?
您可以访问 playableDuration
属性 的 MPMoviePlayerController
。
根据Apple Docs,
The amount of currently playable content. (read-only)
Declaration
@property(nonatomic, readonly) NSTimeInterval playableDuration
Discussion
For progressively downloaded network content, this property reflects the amount of content that can be played now.