We do a lot of tear down in DrmEngine at the same time. While this often
works well for common tasks, when tasks focus on different parts, it can
introduce some race conditions.
This change looks at being a little more strict about the order we do things
in DrmEngine destroy.
While this does not fix#1728, the hope is that this will correct the
"read property 'catch' of undefined".
Issue #1728
Change-Id: Id3cd25b416969ecd75a8cdd6d36959e34673fa1b
When we create a media source engine instance, we pass in
a closed captions parser. However a key subtlety was missing
from the parameter description; media source engine is taking
ownership over the parser.
Change-Id: Id49483ccac4cc1812c31ead9e82c09390ce2ed37
It appears that Chromecasts stop a fraction of a second before a gap.
This would sometimes cause them to stall on gaps in a way that the
stall prevention would not fix.
This changes Chromecasts to use the large gap threshold, to fix those
cases.
Issue #1720
Change-Id: Ifc6720e55ab35b81b8592dad2ba7e7293983a755
Instead of duplicating the default configuration values in each test,
this now uses the default configuration methods.
Change-Id: Ifd2ab349db7903a2acb0d06fed4bd0ccd5050b35
To make it clearer that the CloseCaptionParser uses MuxJS (and therefore
it requires MuxJS) it has been renamed to be MuxJSClosedCaptionParser. To
further isolate the dependency on MuxJS, the support check that we must do
before using the Caption Parser has been moved to a static function on the
parser.
Change-Id: If3385f192434d8f8ce0c1cadbc6365a7c5df9d5d
We have a utility to test what platform we are running on. It looks
like the chromecast tests were not making use of it.
Change-Id: I0eddbf1fe1aa2c1707947a3c268672a3808ec4dc
Updated the shaka.util.Timer class to ES6. In this upgrade, the implementation
was slightly changed to make better use of arrow-functions.
Documentation for the class was expanded on to better document how multiple
calls to start would work. To ensure consistency, both "schedule*" methods were
merged into a single "start" method.
Issue #1157
Change-Id: Iae86cae4d9cb751f0985ef20c371c0023c40bd53
When we switched to using less for our css, we forgot to update
the cast receiver to point to the compiled css. This corrects that.
Change-Id: Ib5d9336fc1b14233731004be845b819be2b20307
Before, we would schedule (and reschedule) the poll function in the
playhead observer. We do this a lot in other classes and even have a
timer class to do that.
This change updates Playhead Observer to use the Timer class to handle
the polling events.
Change-Id: I5982ab08de47d4f8a71ab467989f63c06d0853d2
(cherry picked from commit b8a807b2ef0b2906ee3856a9b2a5dc4922973679)
It looks like the assertion for deprecation was inverted, it
would expect that the enforcer was created even before the
first call.
Close#1744
Change-Id: I74b0321d8db497612b29aaac59678373587b2a8a
Rather than using tracks (that merge the roles) use the streams when
creating the audio-language-role pairs.
The reason we tried using tracks was to remove the need to handle
audio muxed into video streams. With this change, that problem is back
but we fixed the broken behaviour.
Issue #1731
Change-Id: I837406469195956089f33f93f4a9e3c64ffbeab2
A change to how we collect the audio-lanugage-role pairs allowed
the video roles to be included.
This change adds a test to make sure that does not happen. It
will fail now and be fixed in a later CL.
Issue #1731
Change-Id: I1178fce70f38ff7b6d9ddabfb73157985f6f63b6
|applyPlayRange_| in |Player| was previously passed |isLive| but that
value would come from the timeline that it was already passed. Instead
of passing in |isLive| this updates |applyPlayRange_| to check the
the timeline for the "is live" condition.
Change-Id: I13efccd14b9177d2fd652347dce55338d74b7ec8
(cherry picked from commit d02959f3288ec140098d555559bcab9c51d02ca7)
This is consistent with our other configuration settings that are
used as overrides and the manifest values are used as the default.
This means for the manifest URL to be used, there needs to be no
license server URL given in the configuration.
Issue #484
Change-Id: Ib332fe66cd0b13613a17b4ca59496c5185ee65c9
It looks like the lack of a constructor is at the root of the compiler
warnings when you try to alias a class.
To stop the error, I have made a small modification to the session
deleter class so that it could have a constructor.
Change-Id: Iad4614d80dc317b20f01930019096fb388b74ed9
This updates the comments to explain why the test fails, what we are
waiting on from Chrome, and under what conditions it could leave
quarantine.
Change-Id: I1def268ebbc59a4e7be57e46d878061b5b7e2efa
- Drop the containing div
- Move the SVG inside the play button
- Drop overlay semantics, let the button simply contain the spinner
- Change SVG coordinates to fill the viewbox
The SVG size is now matched to the size of the play button, and only
the button needs to be resized to resize both the button and spinner.
Prework for b/116328412, #1715
Change-Id: Ie1386f5f269978763adb36b77defe040e3aab503
Now that we have Safari 12 in the lab, we have found that it requires
the same MediaSource polyfills as Safari 11.
Fixes b/120434307
Change-Id: I45f8be79d0aca7987ffcba1ce13b8589a2287712
This integrates the deprecation tool with our library and updates
all the deprecated warnings to use our new tool.
As some features needed to be removed in 2.5, this change removes them
since their deprecation checks would make us fail.
Change-Id: I28310bbe9df6839719f4763a96026d5968bdcea6
Define a set of tools that we can use to track, test, and communicate
features that are being deprecated.
When you want to communicate that a feature is now deprecated, you just
need to put:
```
shaka.Deprecate.enforce(MAJOR_VERSION_NUMBER,
MINOR_VERSION_NUMBER,
'Your message about what is being deprecated');
```
This will now print warnings when the feature is waiting to be removed and
print errors and fail asserts when the expiration has passed.
Change-Id: Ic66c53ecdfba7922cf961c7f588ab06beceb16ac
Define class that will be used by the deprecation system for handling
library versions. We are only going to support deprecating at a
minor-version number level. We are able to use this to our advantage
when implementing Version as it makes the code MUCH simpler.
Change-Id: I041bc8d7c20a277d84fb621479b3116e3751e319
The original threshold logic in getGapIndex was for IE/Edge
bust was later updated to include Tizen. However the comment
around it was not updated.
This change updates the comment and the code to better
communicate what all is affected.
Change-Id: I05638a5e51e6052946c67c3bc2850d0347c1ce21
To make it easier to know where we are check what platform something is
(normally a sign of a work-around), this change isolates the logic to
make the check into functions.
Now looking for uses of |shaka.util.Platform| should show when we are
using platform-specific logic.
Change-Id: Ief49837c503e951f7138ec08a83355fe1c46db88
When we enter or leave fullscreen without the user clicking our
fullscreen button, we should still react and update the UI as if the
button had been the cause.
This change splits up changing fullscreen state on click from reacting
to a state change, which may or may not be caused by a click.
Fixes#1725
Change-Id: I37b98c6e9eeb508a07c91fec40627e8073295557
This fixes a small bug in the size of the video container (hardly
noticeable) and resolves some TODOs (documenting box-sizing and
abandoning a non-viable refactor TODO about font-family).
Change-Id: I6586e018e79fdf2d0d24a90c0c4c6ec10430e50f
This makes focus styling consistent across browsers and makes the
video element itself non-tab-navigable when the custom controls are
shown. If native controls are turned on, we make the video element
tab-navigable again.
Fixes#1679 (tab nav styles inconsistent across browsers)
Fixes#1680 (tab nav on video element on Firefox)
Change-Id: I7f7a4af4cc8fc6ab1164d821f57684b5d726ebb7
Make the play button a little bigger by default, to encompass the
default size of the SVG spinner.
This fixes display on browsers where our JS resizing code has no
effect, such as IE 11.
Fixes#1709
Change-Id: Ie91869884ab26cec90099a81143880077cefe3c1
For the volume bar and seek bar, we use an input element of type
"range".
These elements are composed of two main parts: a "track", which is the
horizontal bar, and the "thumb", which is the knob which slides along
that bar.
In order to style the track across browsers (cough, IE 11), we need to
do something a bit tricky. Styling the track is a nightmare,
especially if you want the thumb to be larger. On IE 11, this gets
clipped at the track size. So a tiny track with a large thumb is not
easily achieved. It can be done, but the techniques for it are
incompatible with the gradient background we want to apply to it.
The solution is to put the input inside a div container, and apply the
background gradient styles to the container. The container will act
as a visible, virtual track, inside which is contained a larger,
invisible track, in which is contained a visible thumb. This way, the
thumb is not larger than the actual track (for IE 11's sake), but can
be larger than the virtual track. And since we are still using a
semantically correct input element, the element is inherently
accessible.
Fixes#1703
Change-Id: I80e1c18d56e0d1455efd26310b699561bf2f41b0
- Make shaka-overlay-parent a mixin instead of an actual class
- Fox maximum stylability, it should be the job of the styles to
position and overlay objects without JS code declaring that it be
so.
- The "seek to live" effect of clicking the current time no longer
depends on the seek bar being used
- The shaka-transparent class is not needed. The controls are now
set to be opaque based on an attribute.
- Use an attribute for casting state as well.
- Remove redundant opacity transition on play button. It is already
on the controls overlay as a whole.
- Make layout more generic, which allows us to remove some explicit
positioning and browser-specific layout hacks.
- Rename user-select(), whose value is always the default of "none",
to unselectable().
- Remove unnecessary or redundant styles.
- Apply the same default styles to all control elements, whether
buttons, divs, or inputs.
- Make overlay-parent() and overlay-child() more resilient with
settings to fill space by default.
- Consolidate the setting of displayed & hidden in JS.
Pre-work for #1703, #1709 (IE style fixes)
Makes progress on b/116651454 (hard-coded offsets)
Change-Id: I7ea579429979afa98f5b2c54f68114312c4f508d
To fix the race in #1696, StreamingEngine now checks its state in
loadNewTextStream to ensure that it does not start a race between
the startup phase and the new text content.
Fixes#1696
Change-Id: I0f323a5d56b0585fb6e356308aa9eedeee8156b2
This is fairly tricky to reproduce.
First, we must trigger the auto-display of subtitles. We didn't have
any tests that covered this before, so we needed this anyway. This is
triggered by careful choice of content language and language
preferences, which required us to add language information to our
simulated test content. I also added tests for the cases where we
should *not* trigger auto-display of subtitles.
Second, the setup phase for text must complete more quickly than the
setup for audio & video. In real life, this happens when text is
non-segmented VTT and audio & video use DASH's SegmentBase. In the
test, this is accomplished by delaying createSegmentIndex() of
audio and video in our simulated content.
This will cause auto-display of subtitles to trigger a setup race in
StreamingEngine. When text wins the race, MediaSource errors follow
for audio and video.
Issue #1696
Change-Id: I1c22089925486da642368bec269a55d8556900d1
This doesn't start refactoring, but does move a couple of lines around
to group them in clearer ways. It also adds lots of comments
explaining what things are, what they are for, and where they appear.
Pre-work for #1703, #1709, and b/116651454
Change-Id: I77a76c569e4e426b040eaf55f900baa38414fc0c
This doesn't change any styles. It just splits related styles into
several separate files, so that things are easier to find.
Pre-work for #1703, #1709, and b/116651454
Change-Id: Icd3330a70ca6c8ff313991c127f8036238cae813
I will break up our monolithic less file into pieces, but first the
build system needs to understand this. It should see changes to any
less file as warranting a rebuild, but the actual compiler command
only takes the top-level less file on the command-line.
Pre-work for #1703, #1709, and b/116651454
Change-Id: I7be8f9467fa6df449f89ed8f5488fc1c735f0b75
Removing the "aria-pressed" values for the captions button.
Now it's read as "Captions button", and once the button is clicked, it
will read the captions options, like "English button selected".
Issue #1706
Change-Id: I6b4c9208ae688b1b6c1d74126f9aced3876a6d2d
Instead of requiring media source engine to create its own closed
caption parser and then allow tests to override it, have it be
passed into the constructor.
This allows us to easily use the fake one in all our tests and
removes the need for a test only method on media source engine.
Change-Id: Ia1d4f0bb988dca30699b30ccaf4522126f357f90
Since we are not currently planning to extend from the
FakeClosedCaptionParser, this change marks it as "final" so that
our current intentions are better communicated.
Change-Id: I296e6efb9b4654c632fcb5b2f0d30e224a1b9a0e