noreasonprojects / ModernAVPlayer

ModernAVPlayer is a persistence AVPlayer wrapper
MIT License
282 stars 46 forks source link

Add seekableTimeRanages didChange to ModernAVPlayerDelegate #190

Open yaroslavlvov opened 3 years ago

yaroslavlvov commented 3 years ago

Would be nice to have a callback that indicates seekableTimeRanages changed for the current item, would be useful to update min and max for seek bar accordingly, instead of relying on asset duration. Super useful for lives which have sliding DVR window and I need to display UI accordingly

Proposed solution: extend current delegate api with func

    func modernAVPlayer(_ player: ModernAVPlayer, didSeekableTimeRangesChange range: (start: Double, end: Double))