Commit Graph

14 Commits

Author SHA1 Message Date
Michelle Zhuo a09ae24b85 Add audio channels count configuration
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
2018-04-06 20:51:28 +00:00
Jacob Trimble f70436540c Convert 'var' to 'let'/'const' (3 of 9).
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: I10f5c38a8b06b5797c6eec7492829084114514c9
2018-02-14 00:47:03 +00:00
Joey Parrish 529e97fbf2 [ES6] Configure eslint with Google style checks
Some style rules are temporarily overridden until we can get in
compliance.

Issue #1157

Change-Id: Ie27be6ec6632b7786a1f9ebc32911ba9dcd42599
2018-01-18 00:01:05 +00:00
theodab d6773da99b Prefer no role text streams when no preferred role
Beforehand, if there were some text streams with a given language
which had a role, and some which did not, the no-role text streams
would never be chosen.
Now, they are chosen if there is no preferred role.

Closes #1212

Change-Id: I28b426304b1a828f500012425b8d89c94ccc3178
2018-01-04 22:26:57 +00:00
Aaron Vaage 6c89a36fa7 Changed filterStreamsByLanuageAndRole to take streams
Before, filterStreamsByLanguageAndRole would take a period, this changes
it to take an array of stream to better match the function name.

Change-Id: I4621f98ff17d8d1c3c95162217eef9b8cf7aaebc
2018-01-02 17:28:11 +00:00
Aaron Vaage d98df7e244 Changed filterVariantsByLanguageAndRole to take variants
Before, filterVariantsByLanguageAndRole would take a period, this changes
it to take an array of variants to better reflect the function name.

Change-Id: Ic090baf4a281798ec855e369b0b4acdf519fee14
2018-01-02 17:28:11 +00:00
Aaron Vaage f4d655deb1 Changed filterNewPeriods to take audio and video separately
To prevent us from packing and unpacking audio and video from an object
this changes filterNewPeriod to just take audio and video rather than
a map.

Change-Id: I152f2b1762d4ff9ce21cb5b501579bca315e4e4a
2017-11-01 17:18:22 -07:00
Joey Parrish 72c07b35e2 Never adapt across roles or languages
This adds additional logic and tests to filtering in StreamUtils.

Closes #918
Closes #947
Closes #949

Change-Id: I4cce0e0dd5d247e1eaadf7401116cdafb72c7259
2017-08-04 21:11:58 +00:00
Michelle Zhuo d67764b5ff New Error Code for Content unsupported by Browser
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.m3u8

Closes #868.

Change-Id: Ied135b687190919abbeb1561c2bff36a7203136e
2017-08-04 11:07:07 -07:00
Michelle Zhuo 00b440f376 Support audio track selection by role and language
Exposing the roles of tracks, which come from the manifest, in the
select audio language method. This is a follow up on commit
b27861050c11451db57d87270ec1385c1906627a.

Closes #767.

Change-Id: Iebb873f1db8834c7275a8a9fc01c3b855c0288aa
2017-06-15 22:41:21 +00:00
Sandra Lokshina 23a23b9b36 Make language selection explicit. Split text and variant selection.
Add UI options to select current audio and text language.
Split selectTrack() into selectText() and selectVariant().
Stop automatically disabling ABR manager when a variant is selected.
Add a warning if selectVariant() is called while abr is enabled.

Issue #412.
Issue #626.

Change-Id: I15f1c3c4fdc6d6b641f708fbef19dbcf10cbcfc6
2017-01-18 00:05:52 +00:00
Joey Parrish e093ab2f3b Fix text filtering and cleanup MIME computation
During recent refactoring, we introduced a bug in which we would
filter out any text stream with a non-empty codecs parameter.

Replaces PR #639

Change-Id: I9a45ef7e1bc250fd989e3972c0670f3e48336511
2017-01-04 14:28:42 -08:00
Sandra Lokshina e95d7b9de4 Refactor shaka internals to use variants instead of stream sets.
Issue #279

Change-Id: Idf4241b4e2490876bdc6275685361a5c9bf132b0
2016-12-28 17:49:24 +00:00
Sandra Lokshina b9c362808d Define order of AdaptationSet preference.
When a piece of content has several StreamSets with the same
language and role, pick an audio set with lower average bandwidth,
pick a video set with the highest top resolution. Pick the first one
when the above is not applicable.

Closes #476

Change-Id: Id2cb9095994e8aa6b205024504a5d665f8656437
2016-08-15 18:56:32 +00:00