endFraction method

double endFraction(
  1. Duration duration

Assumes that duration is the total length of the video that this DurationRange is a segment form. It returns the percentage that start is through the entire video.

For example, assume that the entire video is 4 minutes long. If end has a duration of two minutes, this will return 0.5 since the DurationRange ends 50% of the way through the video's total length.


double endFraction(Duration duration) {
  return end.inMilliseconds / duration.inMilliseconds;