You can tell it's playing using:
AVPlayer *player = ...
if ((player.rate != 0) && (player.error == nil)) {
// player is playing
}
Swift 3 extension:
extension AVPlayer {
var isPlaying: Bool {
return rate != 0 && error == nil
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…