25 lines
1002 B
Plaintext
25 lines
1002 B
Plaintext
This tests the ability of the SourceBuffer to reset the parser after an abort(). A SourceBuffer in this state should be able to accept a new initialization segment or a new media segment.
|
|
|
|
RUN(video.src = URL.createObjectURL(source))
|
|
EVENT(sourceopen)
|
|
RUN(source.duration = loader.duration())
|
|
RUN(sourceBuffer = source.addSourceBuffer(loader.type()))
|
|
RUN(sourceBuffer.appendBuffer(loader.initSegment()))
|
|
EVENT(update)
|
|
Append a partial media segment.
|
|
RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0).slice(0, loader.mediaSegment(0).byteLength / 2)))
|
|
EVENT(update)
|
|
Abort and append a new initialization segment.
|
|
RUN(sourceBuffer.abort())
|
|
RUN(sourceBuffer.appendBuffer(loader.initSegment()))
|
|
EVENT(update)
|
|
Append a partial media segment.
|
|
RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0).slice(0, loader.mediaSegment(0).byteLength / 2)))
|
|
EVENT(update)
|
|
Abort and append a new media segment.
|
|
RUN(sourceBuffer.abort())
|
|
RUN(sourceBuffer.appendBuffer(loader.mediaSegment(1)))
|
|
EVENT(update)
|
|
END OF TEST
|
|
|