Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Player.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions Sources/RegularPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down