Added a preferred audio channel count to configuration, default set
to 2.
Choose the codec with the largest number of audio channels less than
or equal to the configured number of output channels. If this is not
possible, choose the smallest number of channels.
Closes#1013.
Issue #1071.
Change-Id: I6c6a956e33637cf34bd4bd79af563dc10a595e94
Our HLS parser made init segment references for everything but text
streams. This condition was unnecessary, and the
createInitSegmentReference_ method already returns null if there is
no init segment specified in the playlist.
Closes#1270
Change-Id: Ia9e92a561dc0f9ee3caccfac30f3fb936d9dac87
This is part of a change to convert all usages of 'var' with either
'let' or 'const'. This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.
Change-Id: Ib395106b14156a1f4000b516131684e319db78de
It is useful to have the default presentation delay configurable when the stream provider isn't able to add `suggestedPresentationDelay` in the manifest
Fixes#1234
Per the definition in the latest specification:
https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf
Keep the old method SAMPLE-AES-CENC, which will be deprecated in a
future release.
Issue: #1227
Change-Id: Ib6e553d2d20130822fd2e4e30ffb81e44f8bd64b
This increases the amount of data we fetch to get HLS segment start
times. The presence of a large PSSH box in Widevine-encrypted content
was pushing the "tfdt" box past the 1kB mark, so we will now fetch
2kB.
Issue #1137
References FR in google/shaka-packager#294
Change-Id: I51a1407c4d992e42d07c3e6c6c501051100d1620
When we started fetching partial HLS segments to find the start time,
we were no longer able to start playback for content with a moof box
larger than the partial segment. This is because we parsed the boxes
hierarchically, which required the entire payload.
Now, we can selectively instruct the parser to tolerate a partial box
if the part we have includes the child box we are looking for.
This fixes playback of several pieces of HLS content in our demo app.
Change-Id: I956c8b8905dc9f1707f2b24b8248b984b1c036c6
This speeds up HLS stream startup significantly for servers that
permit this kind of request, and falls back to full segments for
servers that do not.
Closes#1106
Change-Id: I96bc7f0df0fb84b75f3a3fe43476ba0ba5fc2264
Instead of directly splitting on dots, use the URI parser to deal with
URL parameters and hash parameters, then split only the path component
of the URI to extract an extension.
This required the update of all of our fake URLs used in testing, from
test://foo to test:/foo, so that the Uri parser would be able to see
"/foo" as a path, rather than "foo" as a domain.
Closes#1085
Change-Id: Ie7140b03ac689f721562b2537b83432f99667585
The presence of EXT-X-ENDLIST means VOD, regardless of other tags.
Some new sample content exposed this bug, and this change adds a
regression test that mirrors that content.
Issue #740
Change-Id: I11548c83a87c4f993737744ef1b374c7fc013672
We misinterpretted the EXT-X-START tag before. Now, we ignore this
tag and parse segment times from the segments themselves. This is
more robust for both VOD and live HLS content.
We avoid segment parsing when updating normal, well-behaved live
streams. For poorly-behaved live streams, we will fall back to
segment parsing and recover.
This also addresses the issue of VOD content which does not start at
zero. Instead of using configuration to make this playable, we will
now offset VOD content back to 0 automatically.
Issue #740Closes#1011
Change-Id: Ib3a59f87e3a050244cd39854409d8e3542c50b0a
Previously, our HLS implementation only supported WebVTT, because
that seemed to be the only supported format in HLS.
Now, we add support for other formats by extending the MIME and codec
guessing system to text streams. We also add a parser registration
for HLS's new "stpp.TTML.im1t" codec string.
Closes#986
Change-Id: I0a58ca4650675ff0546e36edf4114290f7931239
HLS Live comes in two flavors: LIVE and EVENT.
EVENTs append segments to the end of the playlist, but do not
ever remove segments. LIVE can both append segments to the end
and remove segments from the beginning of the playlist.
This CL lays the ground for supporting both types and introduces
support for EVENTs.
Issue #740.
Change-Id: I2042660daf9d1e7209cb1b40f50ab8b24571faa4
A new test was added to this file. Meanwhile, in another CL, all
tests in the file were updated to reflect a new check against live
streams. Since the two landed independently, the new test started
failing.
Change-Id: I2b733ec9357c98216eabd15ab0b129b03cd0578c
Previously "UNPLAYABLE_PERIOD" exception is thrown when a browser
doesn't support the container or codecs in a piece of content, which is
confusing to developers and customers.
Changing it to "CONTENT_NOT_SUPPORTED_BY_BROWSER" exception.
Test manifest:
https://media-ci.foxford.ru/dist/hls-issue/issue.master.m3u8Closes#868.
Change-Id: Ied135b687190919abbeb1561c2bff36a7203136e
Microsoft HLS packaging tools generate audio-only variants in an odd way;
specifically, the variants have an AUDIO tag despite being audio-only, and
thus double-link to the stream.
Previously, the way we detected stream type lead to us assigning one version
of the audio stream to audio and one to video, thus erroneously making those
variants appear to be video+audio variants.
This makes it so that, if the AUDIO tag has the same content URI as the base
stream, it only uses the version in the AUDIO tag.
Change-Id: Ie940970587e95a9020ed67589042008d0568e153
This is part of adding a new conformance rule to add additional type
safety. This will disallow using properties of unknown types or using
unknown properties.
The first parts will be fixing errors caused by the new rule. These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.
Change-Id: I48335fc6659d3c33a6d55b00d087b59410c79cf7
Adding the count of channels, as a new field for tracks and streams.
Used for HLS audio tracks.
Resolves#826.
Change-Id: I1448b4a8cfaf6dd798670bb2f0f3981d6c7e40c3
At the moment, when there is an xlink problem, the manifest parser
returns a rejected promise. This adds a configuration variable to
instead simply not replace the xml tag.
Closes#788
Change-Id: Iace953233c83a57820130033150e7cd9a9385d6f
- Default CODECS attribute to 'avc1.42E01E,mp4a.40.2'
- Infer stream type and multiplexed status from number of codecs,
associated groups, and video-specific attributes.
- Recombine codec strings when we detect multiplexed content
Closes#805
Change-Id: Ib1298033360b52091b7d871fed0eca047a00ad22
This adds a severity field to Error objects. This can be used to
detect whether an error is recoverable. All the same errors are still
reported so the field can be ignored.
There are two possible values:
* RECOVERABLE means that the Player will try to recover from the error
* CRITICAL means the Player will be unable to continue and must call
load() again
Closes#564
Change-Id: Ie2c5468340c13e7a288b99690ab65b7ecc0a6b29
This abstracts the creation of DrmInfo to parse the EXT-X-KEY tag
differently per KEYFORMAT.
Issue #279
Change-Id: I2e187dcfc01f7306183c9090c54de58e81872bc4
According to the HLS spec, CODECS attribute should have a comma-
separated list of codecs. The example in the spec doesn't contain
spaces between the elements of the list.
However, I encountered spaces in the codecs list in content
encoded by Apple. It's easy to support both ways, so I decided to
do it rather than fight that battle.
Issue #279.
Change-Id: Iecb706207365a51b5964f013e32ffe13e99604c6
Currently HLS parser expects only one media tag to have a given
group id. According to the spec that might not be the case.
This change adds support for multiple tags with the same gruop id
and insures the parser creates variants for all of them.
Issue #279.
Change-Id: I327e52387f7513464fc56c4b6b8d07ead689d6cc
Apple encoded content has a default time offset of 10 seconds.
Every other packeger we've encountered so far doesn't.
New config will default to 0 and allow the application to specify
the offset for their content according to the packager's standards.
Issue #279
Change-Id: I65b16b05a5974a2f0318cd1f9847c3a56c38b745
An init segment is not required for all streams, some streams are
self-initializing (e.g. MPEG2-TS).
Issue #279
Change-Id: I99556ee26f6568cc5e712b50d0bb4de78cb2bd9d
HLS parsing will be split into parsing the text of the manifest into
shaka internal objects and parsing those into a shakaExtern.Manifest.
This will make logic more clear and allow to test ManifestTextParser
independently of HlsParser.
Issue #279.
Change-Id: I44349966d3617e2d208185e3ad125ecea89732b4