Skip to content

Commit

Permalink
fix/ios-hls-live-duration (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
praisedavid787 authored May 7, 2022
1 parent ead7c09 commit fcd5790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SwiftAudioEx/Classes/AVPlayerWrapper/AVPlayerWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit fcd5790

Please sign in to comment.