blob: 7aae76960c183891ad664b6387e0e20abc44ab6d [file] [log] [blame]
This tests the SourceBuffer.remove() API. The test will remove samples from the given startTime (0) up to but not including the presentation start time of the sync sample (4) after endTime (4).
RUN(video.src = URL.createObjectURL(source))
EVENT(sourceopen)
RUN(sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock"))
RUN(sourceBuffer.appendBuffer(initSegment))
EVENT(updateend)
RUN(sourceBuffer.appendBuffer(samples))
EVENT(updateend)
RUN(sourceBuffer.remove(0, 4))
EVENT(updateend)
EXPECTED (sourceBuffer.buffered.start(0) == '4') OK
END OF TEST