Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8276f38b1b | |||
| fcd5790e1e | |||
| ead7c0962e |
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'SwiftAudioEx'
|
||||
s.version = '0.15.1'
|
||||
s.version = '0.15.2'
|
||||
s.summary = 'Easy audio streaming for iOS'
|
||||
s.description = <<-DESC
|
||||
SwiftAudioEx is an audio player written in Swift, making it simpler to work with audio playback from streams and files.
|
||||
|
||||
@@ -85,7 +85,7 @@ class AVPlayerWrapper: AVPlayerWrapperProtocol {
|
||||
else if let seconds = currentItem?.duration.seconds, !seconds.isNaN {
|
||||
return seconds
|
||||
}
|
||||
else if let seconds = currentItem?.loadedTimeRanges.first?.timeRangeValue.duration.seconds,
|
||||
else if let seconds = currentItem?.seekableTimeRanges.last?.timeRangeValue.duration.seconds,
|
||||
!seconds.isNaN {
|
||||
return seconds
|
||||
}
|
||||
|
||||
@@ -300,6 +300,8 @@ public class AudioPlayer: AVPlayerWrapperDelegate {
|
||||
if let image = image {
|
||||
let artwork = MPMediaItemArtwork(boundsSize: image.size, requestHandler: { _ in image })
|
||||
self.nowPlayingInfoController.set(keyValue: MediaItemProperty.artwork(artwork))
|
||||
} else {
|
||||
self.nowPlayingInfoController.set(keyValue: MediaItemProperty.artwork(nil))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user