* Add additional Widevine samples.
* Improve error messaging in demo app around decoders.
* Display toasts for playback errors related to missing insecure
decoders, missing secure decoders, decoder instantiation failure
and decoder query failure.
* Remove checks from SampleChooserActivity, since the above largely
covers off this problem.
This is the main component required to enable WebVTT subtitles in HLS.
It passes through each WebVTT file as a sample, and derives the correct,
adjusted timestamp for each of them on the way through.
Not yet wired up because we need to properly share the same
PtsTimestampAdjuster everywhere, and also stop instantiating new instances
of the adjuster. The adjuster will also need to correctly handle
discontinuities, since we'll no longer be creating new instances of it.
Issue: #151
- parse webvtt cue
- remove all tags from string (supported or not)
- apply spans for b, i and u
- honor class names in tags to properly parse the cue but do not apply styles for them
- Propagate BehindLiveWindowException if we fall off the back
of an HLS live stream.
- Consolidate seekPositionUs and playbackPositionUs into a
single parameter.
Issue: #765
* Split findNextCueHeader and validateWebVttHeader into static methods.
This is a step toward WebVTT in HLS, where we'll need to re-use these
to peek at the top of the WebVTT file (they'll be moved into a util
class).
* Made parser robust against bad cue headers + added a test.
* Removed spurious looking assertion in WebvttSubtitle.
They don't seem particularly useful; they don't technically force
strict compliance, but rather just catch a few token things in
each case. Furthermore, for playback, probably the right thing to
do is to always turn strict mode off.
We were previously using the container format of the media being
played as the mimeType generating key requests, but this is not
always correct. As an example, where a manifest contains webm streams
but specifies initialization data using cenc:pssh elements in the
manifest, the media has a webm mimeType, but the DRM initialization
data has an mp4 mimeType.
It appears the spec calculation gives the h:w pixel ratio, where-as
we want w:h. It's pretty easy to convince oneself that this way round
is correct. Consider a video that's 100px by 100px, and setting
aspectRatioCode=3 to achieve this. The pixelWidthHeightRatio needs to
be 16/9 and not 9/16 :).
Issue: #965