-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
From try job https://github.com/servo/servo/actions/runs/18374617701/job/52348423878?pr=39717
▶ TIMEOUT /_webgl/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
│ ▶ FAIL [expected PASS] WebGL test #0
│ │ → assert_true: video.play failed: NotSupportedError: The operation is not supported. expected true got false
│ │
The following PR #39717 is improved mechanism of media resource selection (including the error handling from network and media engine).
See diff for components/script/dom/html/htmlmediaelement.rs
fn playback_error(&self, error: &str, can_gc: CanGc) {
..................
// <https://html.spec.whatwg.org/multipage/#media-data-processing-steps-list>
// => "If the media data can be fetched but is found by inspection to be in
// an unsupported format, or can otherwise not be rendered at all"
if self.ready_state.get() < ReadyState::HaveMetadata {
// Step 1. The user agent should cancel the fetching process.
if let Some(ref mut current_fetch_context) = *self.current_fetch_context.borrow_mut() {
current_fetch_context.cancel(CancelReason::Error);
}
// Step 2. Abort this subalgorithm, returning to the resource selection algorithm.
self.resource_selection_algorithm_failure_steps();
return;
}
which according to HTML specification https://html.spec.whatwg.org/multipage/#dedicated-media-source-failure-steps rejects pending play promises with NotSupportedError DOMException .
The main reason of this behaviour is GStreamer media backend error reporting for video
{ src: resourcePath + "red-green.webmvp8.webm", type: 'video/webm; codecs="vp8, vorbis"' },
gst-play-1.0 tests/wpt/webgl/tests/resources/red-green.webmvp8.webm
ERROR No valid frames decoded before end of stream for file:///home/v00863305/workspace/projects/red-green.webmvp8.webm
ERROR debug information: ../gst-libs/gst/audio/gstaudiodecoder.c(2488): gst_audio_decoder_sink_eventfunc (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstVorbisDec:vorbisdec0:
no valid frames found
Summary: Now there are three possible situations with playback audio error (with Vorbis)
- WIth
ReadyState::HaveNothing(NEW) ->video.play failed: NotSupportedError: The operation is not supported - With
ReadyState::HaveMetadata-> TIMEOUT (pending play promise is not resolved) - With
ReadyState::HaveEnoughData-> OK/PASSED