Fix live delay computation
Created by: dsilhavy
The goal of this PR is to fix/adjust live delay calculation:
- Fix live delay calculation for SegmentTimeline manifests for which no valid segment request could be generated with the initial live delay. Increase live delay until a valid segment is found instead of starting playback at the beginning of the DVR window
- When live delay is different from the value initially calculated by
computeLiveDelay
it gets adjusted inStreamProcessor.findRequestForLiveEdge
->playbackController.setLiveDelay
- If the live delay should be a multiple of the fragment duration use
@maxSegmentDuration
for multiperiod manifests. For single period manifests iterate through the available AdaptationSets and use the largest segment duration.
This PR is supposed to fix #3227 (closed) and #3146 (closed)
Known Issues: For SegmentTimeline manifests the fragmentDuration is currently NaN. Related to #3284