52 lines
2.2 KiB
Text
52 lines
2.2 KiB
Text
# Media Source Extensions (branch s022-mse-proto): mse-basic.html appends a clip to one SourceBuffer in 32 KiB
|
|
# chunks, ends the stream and plays; ?split (S026) uses separate video and audio SourceBuffers. Passes when
|
|
# MediaSource exists, every chunk is appended, and currentTime advances. Then mse-spec.html (S027) runs the spec
|
|
# cases one by one (see its header); each must report true. Afterwards run tests/smoke/mse-leak-check.sh <outdir>:
|
|
# the leak case's MediaSource must be freed during the run ("MSE: MediaSource <id> freed" in nacre.log). Offline. Run with tools/smoke.sh (needs a build with the
|
|
# MSE patches). mse-off.txt checks the dom_media_source_enabled switch.
|
|
wait 3
|
|
open @PAGES@/mse-basic.html
|
|
waitload 30
|
|
assert typeof MediaSource === 'function'
|
|
waitfor 20 window.mse && window.mse.stage === 'ended'
|
|
waitfor 20 window.mse.time > 1.5
|
|
shot mse-mp4
|
|
assert window.mse.errors.length === 0
|
|
js JSON.stringify(window.mse)
|
|
open @PAGES@/mse-basic.html?webm
|
|
waitload 30
|
|
waitfor 20 window.mse && window.mse.stage === 'ended'
|
|
waitfor 20 window.mse.time > 1.5
|
|
shot mse-webm
|
|
assert window.mse.errors.length === 0
|
|
js JSON.stringify(window.mse)
|
|
# S026: separate video and audio SourceBuffers (video appended 2 s before audio), as YouTube does
|
|
open @PAGES@/mse-basic.html?split
|
|
waitload 30
|
|
assert window.mse.supported === true
|
|
waitfor 30 window.mse && window.mse.stage === 'ended'
|
|
waitfor 20 window.mse.time > 1.5
|
|
assert window.mse.videoWidth > 0
|
|
shot mse-split
|
|
assert window.mse.errors.length === 0
|
|
js JSON.stringify(window.mse)
|
|
# S027: spec cases
|
|
open @PAGES@/mse-spec.html
|
|
waitload 30
|
|
waitfor 120 window.spec && window.spec.done
|
|
shot mse-spec
|
|
js JSON.stringify(window.spec.results)
|
|
assert window.spec.results.attach === true
|
|
assert window.spec.results.duration === true
|
|
assert window.spec.results.ranges === true
|
|
assert window.spec.results.remove === true
|
|
assert window.spec.results.removeSourceBuffer === true
|
|
assert window.spec.results.changeType === true
|
|
assert window.spec.results.abort === true
|
|
assert window.spec.results.reopen === true
|
|
assert window.spec.results.sequence === true
|
|
assert window.spec.results.detach === true
|
|
assert window.spec.results.leak === true
|
|
# then: tests/smoke/mse-leak-check.sh <outdir>
|
|
status done
|
|
quit
|