According to the style guide, protected members should not end with
an underscore. This renames them to fix it. This also marks some
members as private that aren't used outside the class. Lastly, this
fixes a possible bug with the use of "this".
Issue #1553
Change-Id: I6c7ecdcd228ec4e4aded4af52e2262d0bf5beaf4
In noinput mode, we avoided loading the tabs, since they were unnecessary.
However, it turns out that we did need to load them if we wanted to load
custom assets, since they can only be loaded properly if the custom tab
exists.
This changes the demo to load the tabs, and just hide their contents.
Closes#2098
Change-Id: I2c4702fbaae3c88b44d86c7ac9e383728af42867
When setting "position: absolute", you should set the "left" and "top"
properties to ensure it is aligned with its parent correctly. IE11
apparently defaulted to aligning next to the video element. This
ensures the spinner is aligned with the play button.
Fixes#2084
Change-Id: I91041813e36dbfd18a00c22af3f3f5d7e7542f40
This adds a separate configuration value for this because (a) the HLS
parser can't access the streaming configuration and (b) this behavior
is different in that the streams are removed instead of just not playing
them.
Closes#2065
Change-Id: Ic9b1e0d40b161cd4ba0eb6d7c922882112034626
Because configure() is called multiple times, we used to add some of
the event handlers multiple times. For fullscreen, this caused us to
try to toggle fullscreen multiple times. This changes to only add the
main event listeners one time and the DOM-specific ones have been moved
to be added in the configure() call.
This also moves the fullscreen toggle to the try so we can propagate
any errors from it. Lastly, this adds an "error" listener to the
tests to fail the test.
Closes#2054
Issue #2089
Change-Id: Ic78417ce52cae1c53133b5a4217004bb91ebcc4f
- Use <code> blocks.
- Use <p> to separate blocks (since newlines in comments are ignored).
- Use <ul> for lists.
- Give messages for deprecated tags.
Change-Id: I06d5e0e75eb3e498063cf0c291e6031af5d93b2d
You can't use linear-gradient() with one value. The value will be
silently ignored and we will display the last buffered value. This
fixes the buffering display to show that nothing is buffered.
This also makes the gradient construction more readable.
Change-Id: I1a93046ef51b70f94b170067b6c5ed2ae43ada1d
Also unified CSS/less style based on that.
This does have to use a forked version of stylelint, since there
is a bug (?) in the globbing library they use that causes it to
fail on our buildbot. I found the simplest solution was just to add
an option to disable globbing, a feature we weren't using anyway.
Closes#1867
Change-Id: I9295b01d5b15d060356e314938b64b551b75de6a
Our previous approach:
For every variant tag, find the associated media tags(with the same
group id), create stream info for each media tag, and then create stream
info for variant tag based on that, and create variants.
This approach has duplicate calls for the media tags with the same group
id to create stream infos.
New approach:
1. Get codecs from variant tags
2. Create stream info from each media tag (with the codecs from variant
tags)
3. Create stream info for each variant tag, and then create variants.
This creates stream info for each media tag once, and avoids duplicate
calls to guess the codecs.
Issue #1558Closes#2066
Change-Id: Icdf3133b1b15d1baf60624ff449e0a61fdb78d8a
Now there is a generic callback to transform the init data before
passing it to the browser. This can be used by apps to use a custom
content ID in FairPlay content. This also adds some utilities to help
in writing these functions and moves the default behavior to DrmEngine.
Closes#1951
Change-Id: I78ce660c126b53a69d5f55b16775ffcdbbe4d748
This allows a request/response filter to determine which EME session
made the request. This also changes the session ID of FairPlay sessions
so they are available too.
Issue #1951
Change-Id: I1a07abae6faf4a87fad7b5d4290a00b25e83da8e
This reverts commit 6e5a0797de, #2042.
The PR as it landed broke some test cases and functionality for storing persistent licenses, and it doesn't seem to work even for its intended use case.
This functionality was lost in the new demo page. This CL re-adds it.
This also fixes the MediaSession externs, which were incorrect; we
added demo typechecking after we removed MediaSession in the new demo
page, so we simply never noticed that.
Closes#1934
Change-Id: I177b80af70acd5211b7f39e6399965f3fdc696b6
When an asset is loaded, the page scrolls to the top, so you can
see the video. When a tab is shown, the page scrolls to the top of
the tab, so you can browse it.
It turns out that, when you load the page, and it auto-plays an
asset, it loads the asset first, then shows the tab second. This is
because tab loading is triggered by an event, so it happens on the
next interruptor cycle.
This changes the load script to wait one cycle after dispatching the
event that triggers the tabs loading, so that the asset will be
loaded second instead.
Closes#2063
Change-Id: Icfb1a189d1c937afb849e5e584313001498c8c7a
This looks nicer, as the progress indicator is around the download button,
instead of being on the other side of the asset card.
Change-Id: If44cc39691664b95c05665665260c5938123cc4f
If an app uses the shaka.ui.Overlay constructor to create
a UI before our auto-detection code runs, they end up with
two UIs one on top of the other.
I personally think anyone should be grateful to get an
extra UI or two, but people complain for some reason.
Closes#2073.
Change-Id: I793b5a7d8b5092a9b65426f5994019fde75bf957
In mobile fullscreen mode, the captions font size was relatively big,
and the captions overflowing out of video window got hidden.
This was because:
1. In full screen mode the font size was set 4.4% of window height.
Changing it to min(4.4% window height, 4.4% window width) should work
for both portrait and landscape screen.
2. css 'white-space:pre' hides the overflown texts. Should be
'pre-line'.
Closes#2051.
Tested with: Demo app, Angel One, Pixel2 in chrome simulator.
1. Load the video, turn on captions, enter full screen mode.
2. Rotate the screen to see the captions in both landscape and portrait
mode.
Before: The captions font is large, and the screen hides overflown
captions.
Now: The captions font is normal, and if the captions are long, it is
shown in a few lines.
Change-Id: I5c8c3aa900ee3623955b735f93647f1ca54e9a66
To prepare for flattening out the manifest structure to remove
periods, this change moves initSegmentReference and
presentationTimeOffset fields into the SegmentReference object. This
way, the segments on either side of a period transition or HLS
discontinuity can have different offsets or init segments, eventually
allowing us to create a single array of SegmentReferences for
multi-period content.
Issue #1339
Change-Id: Ic7eff0483789644881247ecf8044c5fb6a48f0e6
When unloading content (e.g. when closing or when deleting offline
content), we should exit the PIP window and fullscreen. This moves
these actions to the unload() method so they affect other sources of
unloads.
Fixes#2055
Change-Id: Ie1b5ac0f7cb814ff6bae3b08cc4c1fc80967d941
* fix: Reference issue with SegmentReference createUris
* test: Added Segment GetUris Test for timeline
* feat: Get PSSH from segements if not initdata exists
* feat: Get PSSH from segements if not initdata exists
* fix: JSDoc comments and moved drmEngine update to storage
* fix: Remove comments
* fix: Remove unused import
* fix: Lint erros and dedup initData code
* fix: remove no init data test and add check for use persistent license
This makes the close (X) button on the error bigger.
It also makes the documentation link smaller; specifically, it makes the
link div only the size of the text, rather than the entire width of the
error bar.
Closes#2057
Change-Id: Icb7519daea4831edcc2f42cbb851a34356bc8548
It turns out that, on some browsers, incomplete XML does not properly
parse. This means the parseFirstCue tests did not work on those platforms.
This modifies those tests on platforms that do not support partial XML;
when no support is detected, it instead tries to get the first cue
from a non-partial segment.
This also modifies the HLS parser to only load partial text segments if
the text parser supports it; otherwise, the hls parser will load full
captions in order to extract start times.
b/137945635
Issue #2037
Change-Id: I58112864a818baf155b365a65fba1c8a56eb9520
MediaSource throws if endOfStream() is called when
its readyState is equal to 'ended.' This happens if
endOfStream() has already been called.
This change ensures that we don't try to call endOfStream
on the MediaSource that has already marked as 'ended.'
Closes#2050.
Change-Id: I2672b297f0ebb7fd67afcf72ee52df6d5bacf761
Regression from fcbb725. Other elements rely on controls
knowing current seek state. Now that seek bar is its own
class, it needs to update controls on that.
Change-Id: I29ae8faa9f830ef86380d6b07373dedbeebce263
Enter fullscreen on dbl click behavior got lost after
the UI lib redesign. Also, rotate to fullscreen should
not be conditional on the layout having a fullscreen button.
There might be no button, but we should still enter
fullscreen on rotation for applicable devices.
Closes#2043
Change-Id: Ic75738cdd429851945acb5201780d9d73a6faadd
This updates karma-webdriver-launcher. The new version has an updated
"wd" module dependency and additional debugging information which was
helpful to us in addressing a problem with our testing infrastructure.
b/137548763
Change-Id: Id7fbe53a4c11ff09804a74616791b2e77028386e
This is not run regularly or by default, and many things about it were
broken since the last time we paid attention to it.
The DRM checks were broken in the demo app refactor for v2.5, and
other parts were broken for even longer.
Change-Id: I053f2615a749e7e7d6252f689d16c50b99cf94ff
1. Make createPeriod_() and createVariantsForTag_() clearer to read.
2. Simplify and remove duplicate code.
Change-Id: Idda7cb40f33905afd9512d427d7e78cb6c96ede9
In a recent refactor that made some internals of DASH parsing async for the first time, we broke the creation of SegmentReferences by having createUris close around values that changed later. This fixes the bug and adds a regression test.
Before, it would only check one match per line. Now it finds all the
matches to ensure a correct spelling doesn't hide an incorrect spelling
on the same line.
Change-Id: Iee6c7fb617852bf858a27c1c2a19026be5d8d089
Previously, when the text engine tried to load the start time of
a segment, it would parse every cue in that segment, then check the
time of the first cue. This was judged to not be a significant
performance issue, as parsing cues is a fast operation. However, it
did have an unintended side-effect: in some situations, this method
was being passed partial segments; notably, the HLS parser would load
the first 2048kb of the stream's texts to extract timing data.
If the caption parsers tried to actually parse an incomplete caption,
they would error.
This gives the text parsers "parseFirstCue" methods, and uses those
methods when it only needs the first cue anyway.
Fixes#2037
Change-Id: I2a1fb2f1a96d98967f0c6e6a5c277914a28b42ad