28 JsError OutOfRange(uint32_t index,
size_t max) {
30 ss <<
"The given index " << index <<
" was greater than the number ";
31 ss <<
"of elements " << max;
39 TimeRanges::~TimeRanges() {}
47 if (index >= ranges_.size())
48 return OutOfRange(index, ranges_.size());
49 return ranges_[index].start;
53 if (index >= ranges_.size())
54 return OutOfRange(index, ranges_.size());
55 return ranges_[index].end;
ExceptionOr< double > Start(uint32_t index) const
bool IsShortLived() const override
static JsError DOMException(ExceptionCode code)
TimeRanges(media::BufferedRanges ranges)
ExceptionOr< double > End(uint32_t index) const