The HTML5 'input' event does not work correctly on all input elements
in IE 11. There are equivalent events that the UI can use on IE.
Instead of remembering this and checking for IE every time the 'input'
event is needed, let the polyfill translate the event type.
Change-Id: I23258a5c6a0bd37e946214380ad07949f3ee7f88
Two EME polyfills currently assume persistent storage support: one
for old Tizen TVs and other older embedded Chromium devices, and one
for IE11.
This backfires when an application is trying to detect support for
encrypted offline content.
By removing this assumption, we do not convey support for EME features
that are not known to be available on these devices.
Change-Id: If427eeda1cde60341a2b57f76744c2adfdb34beb
Based on PR #839
We use |resumeAt| to handle switching between Periods that do and do not
have text streams. It is used to override what time we need to start
buffering from. Once we have used it (i.e. started streaming), we
should reset it (to ensure it doesn't break seeking).
There was a bug where if the stream wasn't available yet, it we
would reset |resumeAt| but not start streaming. Meaning on the next
update, we would check at the playhead time instead of the next Period
time. Now we reset |resumeAt| only after we know we have started
streaming.
Closes#839
Change-Id: Ibd3ce680cec129719869c8d4a7dda409b573a17f
In situations where there are variants with video and audio, and variants
with only one of the two, this filters out the less-complete variants.
This removes the possibility of the player switching to an audio-only
variant and breaking MediaSource. It also solves the regression where
audio-only variants have the lowest bandwidth and thus are chosen
preferentially on weak connections.
Closes#824Closes#861
Change-Id: Ic37543d98962ddd83a85224e26e5225d142b844e
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: Ic37437a1ad2305bc50a814cdcc562e74703222ac
We should not reinit text until we are sure we are switching.
Otherwise, the new text parser won't have seen the init segment and
won't be properly initialized.
Closes#910
Change-Id: Ieb5549afcad7aa58aa1a6e8d383f3cd783280d5c
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: Iefde089b2f62ddfdf43944cda5badab438577561
If we haven't gotten a key status within 5 seconds of updating a
session, consider the session "loaded". This fixes a hung Promise
in DrmEngine for offline use-cases.
Issue #891
Issue #894
Change-Id: Ic4c7478198a0db4b3a3df8842d5f8cd1f6f3e8bd
This works around Tizen 3.0's misreporting of its support for
persistent licenses, which prevents us from running persistent
license tests on that platform.
There is still one more failing test on this platform.
Issue #894
Change-Id: I81ebb80a831c753e3af4851efcbd7e97211e6890
Adding the count of channels, as a new field for tracks and streams.
Used for HLS audio tracks.
Resolves#826.
Change-Id: I1448b4a8cfaf6dd798670bb2f0f3981d6c7e40c3
The new isPersistentLicense option was not documented in #878.
This adds docs and renames it to usePersistentLicense.
Closes#873
Change-Id: I59ed32c98660ad7c155392a1708eab98f63131c3
Based on app configuration, we could store protected content offline
without a persistent license. The offline content would then require
a network connection, but only briefly for licensing. This makes
sense in a lot of commuter or airplane WiFi scenarios.
Closes#873
Our EME polyfills give a key status with a Key ID of '00' (a single 0
byte). This breaks the Player logic for restricted tracks since it
assumes that those are not playable. When we get this Key ID, we should
treat the key status as a global status, not for that specific Key ID.
Closes#884Closes#890
Change-Id: I392550227274fb321d2c223eb8d483a0a4733186
In DASH, when parsing a date, it should default to UTC. When we pass
the date string to Date.parse(), it will use the local timezone. So
if we don't see a timezone, we need to manually add the UTC timezone
so Date.parse() will parse the correct timezone.
Closes#901
Change-Id: Ica0433042e9bfd42b0cbf62653bdbd2b97b56297
Like other browsers, the Tizen TV sometimes stalls when inside an
otherwise playable region. Our technique of flushing by seeking to
the current time doesn't work. So instead we seek a small amount
in the future.
Closes#893
Change-Id: I91e56e3b9a22fac21fb1d8f66a30a6237b3b28e5
Tizen TV seems to stall when it plays into a gap. This stall isn't
fixed by a seek. So when gap jumping, we should jump before we hit
the gap on Tizen.
Fixes: 62628840
Change-Id: Iff7b7a2a4c2c2a5b9015728f1dceece6421463b9
Trying to switch to a stream from a previous Period while we are
buffering a later Period can cause problems. This is caused by
different media states "needing" different Periods.
So if we try to switch to a stream from a different Period, we should
handle the Period transition then to ensure all the streams are needing
the correct Periods.
Closes#797
Change-Id: I3d93d93bf141901fe8f8f62fd0ca9fa96a07c268
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
This fixes the detection of content type for text AdaptationSets which
contain mimeType only, but contain a Representation with codecs only.
Closes#875
Change-Id: Ibae7ae8357653c1960daefa4c3e122187de51bb3
If you attempt to load an asset and then the first load fails, then
the second load will hang forever. This was caused by the second load
trying to cancel the first, but the CancelableChain not handling this
case.
Closes#782
Change-Id: I79e201db44cbf47485e7221cc148bbfdde6276f7
There was a bug where manually added text tracks weren't added to the
active track list in Player. This caused assertion failures and
problems with selecting those tracks. Now those tracks will be tracked
correctly. Note that Player will correctly select text tracks based on
language and will allow switching.
Closes#821
Change-Id: Ie9465a2d3bc757f43281ef40658daa488f58bc12
This change creates a lib/text directory and moves all files
with text-related logic to it. It also lays the ground for
separating text parsing and display logic. (That change will
introduce even more files with text-related logic which will
crowd lib/media directory).
Issue #796.
Change-Id: I65ac134020a0126ff02a8f2067beb73870232e65
We were giving Storage a Player proxy from CastProxy instead of a
local Player instance. This fixes the mistake and adds a new error
code to make it clear when this mistake is made by other apps.
Change-Id: I4f2d49adc45ef5ca3a942a72192a09f001f5100c
Before asking AbrManager to choose streams, we should choose codecs.
Choose the most efficient codecs, and do it after we have filtered
out the codecs that the platform cannot use.
Closes#841
Change-Id: Ifbdd22b33254d4584f77db6456ab238f7c04c755
Do not infinitely retry on top of the retry-policy already defined by
RetryParameters, especially for VOD. For live video the previous retry
logic is still useful to be robust against clock-sync or asset
availability issues. This commit adds a boolean configuration parameter,
infiniteRetriesForLiveStreams, to allow the user to turn this behavior
off even for live video.
Fixes#830 and #762
- cleans up config merging now that abr.manager has been removed
from the config
- uses thing.constructor == Object instead of
typeof(thing) == 'object', for better detection of anonymous
objects
- adds a default (empty) server certificate for type-checking
- treats empty certs the same as null (no cert provided)
Fixes#784
Change-Id: Ie833a1b3bf484d5f12f3ebf6d513ed51740bdc44
We broke PlayReady on IE and Edge in #815 when we fixed PlayReady for
Tizen. This should work for both, but will still need to be tested on
Tizen after merging.
Closes#837
Change-Id: Iff41845ae6a4b369e8f21a80623ebb2cb5475fd6
This change makes ABR targets configurable and refactors player
to accept Abr Manager factory rather than have manager be
part of ABR config.
Closes#744
Change-Id: I732daaf555d21cc9e79450eeb1f74ac3544b90cc
This change is to expose an audio track's role in order to differentiate
among a main / caption / commentary track that shares the same
language.
Issue #767.
Change-Id: I05d38cba2170d0005611cf160b7ae45996fe77dd
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
Most of the times we want an attribute, it is only to get the value.
This adds a convenience method that gets the value directly, with an
optional default value if the attribute is not found.
Change-Id: I79002c4d6d4d4da468860238eab16fff6b8df747
We batch up key status changes in DrmEngine. This increases the
timeout from 100ms to 500ms to address some flakiness in tests that
are being run in a project that depends on Shaka Player.
b/38426414
Change-Id: Ie6d8b14a981b2cff1c152f7571cd98ef4c382b96
Chromecast has a variant of PlayReady that uses a different key system
ID.
In addition to mapping between key system IDs and making other small
exceptions for Chromecast, I also fixed a bug in the calculation of
expired key statuses. The ChromeCast PlayReady implementation does
not expose key status information at all, and this caused us to
erroneously declare all keys expired.
Change-Id: I52c96eec0040af6bf902a614760b8cd06e608dcd