Skip to content

Commit

Permalink
Merge pull request #47 from jorgenhenrichsen/queue-access
Browse files Browse the repository at this point in the history
Queue access
  • Loading branch information
jorgenhenrichsen committed Apr 7, 2019
2 parents 3930096 + 0ae0427 commit 852578c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ SwiftAudio is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'SwiftAudio', '~> 0.7.0'
pod 'SwiftAudio', '~> 0.7.1'
```

### Carthage
SwiftAudio supports [Carthage](https://github.com/Carthage/Carthage). Add this to your Cartfile:
```ruby
github "jorgenhenrichsen/SwiftAudio" ~> 0.7.0
github "jorgenhenrichsen/SwiftAudio" ~> 0.7.1
```
Then follow the rest of Carthage instructions on [adding a framework](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).

Expand Down
2 changes: 1 addition & 1 deletion SwiftAudio.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SwiftAudio'
s.version = '0.7.0'
s.version = '0.7.1'
s.summary = 'Easy audio streaming for iOS'

# This description is used to generate tags and improve search results.
Expand Down
14 changes: 14 additions & 0 deletions SwiftAudio/Classes/QueuedAudioPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ public class QueuedAudioPlayer: AudioPlayer {
return queueManager.current
}

/**
The index of the current item.
*/
public var currentIndex: Int {
return queueManager.currentIndex
}

/**
Stops the player and clears the queue.
*/
Expand All @@ -36,6 +43,13 @@ public class QueuedAudioPlayer: AudioPlayer {
queueManager.clearQueue()
}

/**
All items currently in the queue.
*/
public var items: [AudioItem] {
return queueManager.items
}

/**
The previous items held by the queue.
*/
Expand Down

0 comments on commit 852578c

Please sign in to comment.