Skip to content

Commit

Permalink
resolving #9 and 11
Browse files Browse the repository at this point in the history
  • Loading branch information
phiamo committed Mar 27, 2022
1 parent f001cdd commit 3142bb5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ios/Plugin/AVBidirectionalQueuePlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class AVBidirectionalQueuePlayer: AVQueuePlayer {
// the queue (such as restarting the item).
currentIndex() == 0
}

/*
var isAtEnd: Bool {
guard let currentIndex = currentIndex() else { return true }
return currentIndex >= (queuedAudioTracks.endIndex - 1)
}
}*/

var currentAudioTrack: AudioTrack? { currentItem as? AudioTrack }

Expand Down Expand Up @@ -185,14 +185,16 @@ class AVBidirectionalQueuePlayer: AVQueuePlayer {
}

// OVERRIDDEN AVQUEUEPLAYER METHODS
/*
resolving #9 and 11 and taking this out remove code after stabilize
override func play() {
if isAtEnd {
// we could add a flag here to indicate looping
setCurrentIndex(0)
}
super.play()
}
}*/
// This does the same thing as the normal AVQueuePlayer removeAllItems, but clears our collection copy
override func removeAllItems() {
print("removeAllItems")
Expand Down

0 comments on commit 3142bb5

Please sign in to comment.