Compare commits

...

1 Commits

Author SHA1 Message Date
Freddy Kellison-Linn c98a2e81f1 Add default implementation for 'ended' property 2019-09-23 16:18:02 -04:00
2 changed files with 6 additions and 4 deletions
+6
View File
@@ -80,6 +80,12 @@ public enum PlayerError: Int {
func pause()
}
public extension Player {
var ended: Bool {
return self.time >= self.duration
}
}
// MARK: Identity Protocols
/// A player that adopts the ProvidesView protocol is capable of providing a view to be added to a view hierarchy.
-4
View File
@@ -119,10 +119,6 @@ extension AVMediaSelectionOption: TextTrackMetadata {
return self.player.rate > 0
}
public var ended: Bool {
return self.time >= self.duration
}
public var error: NSError? {
return self.player.errorForPlayerOrItem
}