blob: 1f606e24caaf2937c55ea5247ed5db10f65606e0 [file] [log] [blame]
This tests that a SourceBuffer can accept an initialization segment and a media segment and fire "update" events, and the video element fires a "resize" event after the SourceBuffer appends the initialization 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)
EXPECTED (resizeEventFired == 'true') OK
EXPECTED ((videoWidth == 320 || videoWidth == 0) == 'true') OK
EXPECTED ((videoHeight == 240 || videoHeight == 0) == 'true') OK
Append a media segment.
RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))
EVENT(update)
END OF TEST