validateYlTimeline function

void validateYlTimeline(
  1. YlTimeline timeline
)

Raw native negative live offsets must be clamped to zero by the adapter before constructing these domain values. Other negative times are invalid.

Implementation

void validateYlTimeline(YlTimeline timeline) {
  for (final time in [
    timeline.position,
    timeline.bufferedPosition,
    timeline.duration,
    timeline.liveOffset,
  ]) {
    if (time != null) _duration(time);
  }
  final window = timeline.dvrWindow;
  if (window != null) validateYlDvrWindow(window);
}