How to update a custom duration for segmentedprogress and to update progress as well?
I am also getting same issue
i have a multiple story and each story have a video. each video have a different time duration.
https://github.com/sashabaranov/SegmentedProgressBar/commit/6542b5feeea916a35af760e350114acaecc70545
@shrykg can we update time ruration run time for example, when user come to the second story at that time update that index time duration
@ubrainrepo yes you can. For that in next() function in SegmentedProgressBar move line :
self.delegate?.segmentedProgressBarChangedIndex(index: newIndex)above self.animate(animationIndex: newIndex).
Then in your delegate method : func segmentedProgressBarChangedIndex(index: Int) change the desired index in durations array. Like : segmentBar?.durations[index] = videoDuration