This reverts commit 6667ea5edf and
reimplements it using a fallback to an arbitrary media element when
there isn't one yet.
This also adds a regression test that would have caught the issue
sooner.
Closes#2326
Change-Id: I44573ae551db51f788d7c97b9680dfd45adee0a0
This updates the fullscreen externs to:
- Add a newer definition for requestFullscreen which includes options
for the method
- Remove prefixed methods which are now built into the compiler and
are no longer necessary
- Drop document.webkitSupportsFullscreen method, which does not seem
to exist as defined, even on iOS (confusion with similar property
on video element: https://apple.co/39TLC5I)
This enables PR #2325 to resolve issue #2324
Change-Id: Ie7bea7e7d4fd59d6d801431e2ba996649e185dc1
This changes the eslint rule to enforce a strict pattern for the
argument comments. The comment must appear before the argument and
must be /* foo= */. This still ignores line comments.
Change-Id: I3afb01c65e1088eda13facb3aeeaa7595a2f5aee
This method should probably never have been in the library, since it
creates a fixed-sized, muted element.
Change-Id: I53b474305465bef34d43ce40ec5e7dedceb20a25
This is a step along the way to flattening periods, and also
simplifies a few small things in StreamingEngine and tests.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: Ie17cd5e15ed6ec9290a918c3a69c05c74581e0fc
While we are loading, we have a specific media element we are trying
to play with, so there is no need to use Platform to pick an arbitrary
one.
This is important for Shaka Player Embedded where playback support may
depend on the specific video element so we should query the correct
element. This also avoids calling "document.createElement" since we
already have a video.
Change-Id: I289dc05398a73e8f978d8ae213f236dd5cd652cf
SegmentReference used to have presentationTimeOffset, which,
subtracted from the period start time, was then _added_ to the
timestamps in the segment by MediaSource.
Now, SegmentReference has a timestampOffset field, which is exactly
what MediaSource's timestampOffset field is set to on the SourceBuffer
before this segment is appended. For DASH, this is periodStart minus
presentationTimeOffset.
This also adds append window start & end times to the
SegmentReference. Now segments can be appended to SourceBuffers
without reference to the period.
Note that start & end times of the SegmentReference in each segment
index are still relative to the period. This will change in a
follow-up.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: I9d54eb2b529ec643c9475b8e9d218c3e2e826a26
An upcoming release of the compiler gets confused about robustness
fields being potentially undefined. Adding a fallback to a blank
string satisfies the compiler.
Change-Id: I794b49002c86dde7236a09061c8ed2390ae26136
This fixes several inter-related issues:
1. Catch errors in polyfill installation so that test setup isn't
interrupted half-way through
2. Use the compiled polyfill in tests, fixing polyfill installation
error during tests on IE
3. Require at least version 1.0.2 of the polyfill, since 1.0.0 had
bugs in the module export and 1.0.1 had an infinite recursion bug
Change-Id: I38c973152409d9b3168e70e82f20579566663208
The generated externs did not include shaka.polyfill because we used
the wrong annotation on the class. This fixes it.
Raised in PR #1273
Change-Id: I348064a117a7e1878b439ad8bd1ce49df56bfd39
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
Because aborting requires knowledge of the new stream, this process
must be done asynchronously. This makes the abort logic async, and
checks carefully for any stream or operation changes during the
process.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: Ic187676eeca907603efeb0ffa11855b9af2fc5ca
Instead of making many internal methods async to accomodate
createSegmentIndex being called lazily, just call createSegmentIndex
during the update cycle instead. This greatly simplifies things and
allows me to revert some of the changes I made in the earlier commit.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: I72be8e88f0cf8b04b63d3cda129fa38cef727c0f
The PR to add support for pulling EME init data from the segments was
incorrect and had some bugs. This stops re-initializing DrmEngine since
this isn't needed and could cause problems with the offline licenses.
This also just uses the Pssh helper once to parse and extract the
init data. Lastly this throws the old error if we don't have any
sessions when we are done; if we try to store WebM content, we should
still throw if there is no init data in the manifest.
Issue #1531
Change-Id: Ie524abda993a076397e233008709f11a2e68a8f8
Now shaka.util.Pssh will only create a view on the buffer instead of
re-creating the PSSH boxes for each element. This also removes the
boundaries field since the data fields are the useful ones.
This also fixes a possible bug in BufferUtils, updates comments, and
adds some more tests for negative offsets.
Change-Id: Ibe1b7d61d5f5c7e52dfd7aa954db98f0592da4a5
The "reader" reads the payload of the box, so we need to add the header
size to the start index to get a correct value for the "start" field.
The "start" field isn't used anywhere, so this wasn't caught.
Change-Id: Ia870d01620524ac6e87dea2b7f1bc8571425a976
In StreamingEngine, rather than wait to enable ABR after indexes have
been created for all streams, create each stream's SegmentIndex
on-demand as needed during playback. This means ABR can be enabled
much more quickly, and also eliminates some complexity from
StreamingEngine's startup sequence.
This required several test changes, since many of our tests were
accidentally structured to depend on certain operations either being
synchronous or happening early during startup.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: I4bc1d0cdf9022aad14a008accf0aac37c870a83f
1) Play buttons' icons now toggle between play and pause
depending on ad state during ad playback.
2) Controls fade in and out on mouse out/in during
ad playback similar to how they do it during the
presentation.
Issue #2222.
Change-Id: I97ce3b5aa70bdfdd758a54894a3d94b38bccf953
This CL makes the controls switch between controlling
the ad and the presentation. If there's an ad currently
playing, pause button will pause the ad instead of the
presentation, mute button will mute the ad, etc.
Change-Id: I42f57df9a5ce491ed842f39e0f1e6031d1e3a93c
Most of the persistent-license bugs on Chrome have been fixed, so this
updates the comments to point to the only remaining issue. The tests
have also been updated to pass (except for the flaky failure caused by
the remaining bug). The tests are still quarantined since they are
fairly flaky, even with a large delay.
This also adds some more logging to DrmEngine, makes it use the
"session.closed" property when closing, and removes the close
workaround for Chrome since it has been fixed.
Change-Id: I2dbd0b7005e288ae2a4d9694516daae6f5e0b49a
When storing assets offline with the storage system, the DRM
engine is used if the asset is protected. However, we never attach
the DRM engine, which means it never gets an associated video.
When the delayLicenseRequestUntilPlayed config value is set, the
DRM engine checks the paused status of the video; thus, if there is no
video element, the DRM engine errors and the download fails.
It would be fairly simple to make the DRM engine attach the video, but
honestly, the delayLicenseRequestUntilPlayed parameter doesn't make
sense for offline storage anyway. So this just changes the DRM engine
to ignore delayLicenseRequestUntilPlayed if it has no video.
Fixes#2218
Change-Id: If4e8d24fdcd1eca81cc39b845e5a833a3f1ce5e6
An empty list is still truthy, so the if statement should check for a
non-empty list instead. This ensures we don't try to append captions
when we play audio-only content.
Fixes#2187
Change-Id: I589a5508878ab28ad1ac69211f331ea829fa8b28