New issue
Advanced search Search tips

Issue 766377 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Unsupported HLS should trigger HTMLMediaElement's "next source" scheduling.

Project Member Reported by dalecur...@chromium.org, Sep 18 2017

Issue description

The Android platform unfortunately does not support HLS w/ fMP4 segments and Apple has provided no guidance on how to differentiate TS vs fMP4 segments in canPlayType().

To ensure fallback to a potentially supported source, we should make sure that MediaPlayer preparation errors are treated in such a way as to trigger the "next source" handling in HTMLMediaElement:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp?l=1571
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp?l=940

We currently deliver any loading errors after providing (fake) metadata; which prevents the resource selection algorithm from running since we are no longer < kHaveMetadata. We need to either ensure these errors are delivered prior to kHaveMetadata (hard, because we don't want to load MediaPlayer until the user actually wants it) or figure out some way for these errors to directly invoke the resource selection algorithm.
 
FWIW, a 2012 iPad and anything else stuck at iOS9 (< iOS11?) will fail playback and not proceed to the next <source> element when HLS+fMP4 is used as well:

http://storage.googleapis.com/dalecurtis/shaka/hls_fallback.html

Labels: Videostack-HLS

Sign in to add a comment