This seems to reduce flakiness in the TextDisplayer tests. The
theory is that Safari throttles timers when the system is very busy,
which it often is during full test runs across multiple browsers. By
not relying on timers and triggering an explicit update in the
TextDisplayer, the tests seem to become more reliable.
There was an exception to waitForEnd in StreamingEngine tests that
could have been handled generically inside the waiter for all tests.
It was also necessary to poll for ended state since the Firefox 99 update.
This fixes some recent test failures on Firefox 99.
Parse EXT-X-GAP HLS tag and add a status enum to shaka.media.SegmentReference.
shaka.media.SegmentReference.Status.AVAILABLE --> Normal behaviour
shaka.media.SegmentReference.Status. UNAVAILABLE --> Related to https://github.com/shaka-project/shaka-player/issues/2541
shaka.media.SegmentReference.Status. MISSING --> EXT-X-GAP in HLS
Note: only the parsing is added, but the functionality is not yet implemented.
Issue https://github.com/shaka-project/shaka-player/issues/1308
If another instance of the build-and-test workflow is started for the
same PR, cancel the old one. If a PR is updated and a new test run is
started, the old test run will be cancelled automatically to conserve
resources.
Includes a YAML config file for our lab, and documentation on how to
create a custom config for another Selenium grid.
A workflow will run tests nightly in the Shaka lab, using a
self-hosted runner with access to our private grid.
The workflow can also be triggered manually by maintainers to test a
PR in the lab. This will report status back to the PR.
Fixes these issues with the demo index deployment (tested by manual deployment):
- Missing `handlers:` field in app.yaml
- Missing handler for the URL `/`
- Missing Flask entrypoint (even though no dynamic content is generated by it)
Closes#4074
Rather than runtime-querying of appengine versions within the
appengine environment, we can instead generate the index at deployment
time (from git tags) and just serve static content. This simplifies
the system and avoids dependence on Google Cloud.
This was less feasible before we adopted GitHub Actions, but is now
relatively simple. The index will be regenerated when the index code
is updated or when a new release is created.
Closes#4074
Below are the changelog entries for each deprecated feature removed by this commit.
-----
feat(config)!: `manifest.dash.defaultPresentationDelay` has been replaced by `manifest.defaultPresentationDelay` (deprecated in v3.0.0)
feat(config)!: Configuration of factories should be plain factory functions, not constructors; these will not be invoked with `new` (deprecated in v3.1.0)
feat(player)!: `shaka.Player.prototype.addTextTrack()` has been replaced by `addTextTrackAsync()`, which returns a `Promise` (deprecated in v3.1.0)
feat(ui)!: `shaka.ui.TrackLabelFormat` has been renamed to `shaka.ui.Overlay.TrackLabelFormat` (deprecated in v3.1.0)
feat(ui)!: `shaka.ui.FailReasonCode` has been renamed to `shaka.ui.Overlay.FailReasonCode` (deprecated in v3.1.0)
feat(offline)!: `shaka.offline.Storage.prototype.store()` returns `AbortableOperation` instead of `Promise` (deprecated in v3.0.0)
feat(offline)!: `shaka.offline.Storage.prototype.getStoreInProgress()` has been removed; concurrent operations are supported, so callers don't need to check this (deprecated in v3.0.0)
feat!: `shaka.util.Uint8ArrayUtils.equal` has been replaced by `shaka.util.BufferUtils.equal`, which can handle multiple types of buffers (deprecated in v3.0.0)
feat(manifest)!: `shaka.media.SegmentIndex.prototype.destroy()` has been replaced by `release()`, which is synchronous (deprecated in v3.0.0)
feat(manifest)!: `shaka.media.SegmentIterator.prototype.seek()`, which mutates the iterator, has been replaced by `shaka.media.SegmentIndex.getIteratorForTime()` (deprecated in v3.1.0)
feat(manifest)!: `shaka.media.SegmentIndex.prototype.merge()` has become private; use `mergeAndEvict()` instead (deprecated in v3.2.0)
feat(plugin)!: `AbrManager` plugins must implement the `playbackRateChanged()` method (deprecated in v3.0.0)
feat(plugin)!: `shaka.extern.Cue.prototype.spacer` has been replaced by the more clearly-named `lineBreak` (deprecated in v3.1.0)
feat(plugin)!: `IUIElement` plugins must have a `release()` method (not `destroy()`) (deprecated in v3.0.0)
The script for deploying the demo version index page has a function
that chooses which versions to display. This script has a special
mode meant for testing that shows a default list of demo versions.
This mode was only supposed to trigger when run locally, but the
check did not work properly, so the demo version index was deploying
with a very out-of-date list of versions.
This fixes that check.
Closes#4074
<!--
Please remember to:
1. Use Conventional Commits syntax (fix: ..., feat: ..., etc.) in commits and
PR title (https://www.conventionalcommits.org/)
2. Tag any related or fixed issues ("Issue #123", "Closes #420")
3. Sign the Google CLA if you haven't (https://cla.developers.google.com)
You may delete this comment from the PR description.
-->
This change fixes tests on Chromecast by loading tests later in the process. Test scripts are now dynamically inserted by boot.js, rather than loaded by Karma. The bootstrapping code then awaits the completion of that before starting the Karma frameworks (Jasmine) to run the tests.
This also removes the use of goog.provide/goog.require in tests and test utils. We don't need to load test utils or library sources dynamically in each test, and this gives us more explicit control over script loading and ordering.
Closes#4094
Rather than require everything, require only the top-level classes for
the demo, and let them require their dependencies. This is consistent
with how this works in the library itself.
Related to issue #4094
The demo sources didn't properly provide/require the shakaAssets
namespace. This caused issues when I tried to change the way demo
sources were loaded in tests.
Related to issue #4094
Jasmine 4 deprecated some part of its custom matcher API.
This puts us in compliance with the new API (by omitting a parameter
we didn't really need), and silences the deprecation warnings (which
only showed up when enabling logging in the tests).
Since transitioning from the deprecated depswriter.py to the new
closure-make-deps tool in 6f274cbc, the build system has been ignoring
any failures in the generation of deps.js. This is because the new
tool doesn't return a proper non-zero exit code when it fails. (See
https://github.com/google/closure-library/issues/1162)
This changes the build scripts to check for empty output instead,
which seems to be reliable for the moment.
It appears that the problems we previously had with TS content
on Safari have been fixed. We no longer need the workaround where
we transmuxed TS on that platform.
This PR fixes#3242 where for some live streams using segmented VTT, text timings are relative to segment start instead of being absolute.
The PR introduces a new setting: `manifest.segmentRelativeVttTiming: boolean` allowing such alternative timing offset calculation.
The setting is off by default, preserving the current player behaviour.
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
In the GitHub Actions environment, it is now possible to install and
run tests on Safari 14. Though not completely straightforward, it
doesn't add much code to the workflow and shouldn't be too difficult
to maintain.
Closes#3899
Some events and timers were used to process track changes with src=
playback on Safari, but they did not properly clean up when the player
was unloaded or destroyed. In the case that this happened quickly
after starting playback, exceptions would be thrown or tracks could
manipulated after new content began.
This fixes the cleanup of these timers and events to be aware of
Player unloads or destruction.
Closes#4087
Example content protection tags parsed:
```xml
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="<default key id>" />
<ContentProtection value="ClearKey1.0" schemeIdUri="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e">
<clearkey:Laurl Lic_type="EME-1.0">License Url</clearkey:Laurl>
```
The player parses the default key id and license url,
and sends a POST request to license url as per https://w3c.github.io/encrypted-media/#clear-key-request-format to retrieve the decryption key/s.
For content where the manifest parser uses the notifySegments API
(DASH SegmentBase/SegmentList/SegmentTimeline, or HLS, but not DASH
SegmentTemplate+duration), the Player seekRangeEnd configuration was
not being honored correctly.
This fixes the issue in PresentationTimeline and adds a regression
test to our playRangeStart/playRangeEnds tests.
Fixed#4026
This fixes the workflow job failing because of missing sources, and it
also fixes the job to run the compiler, not just build the image that
_could_ run the compiler.
Closes#4076
This makes the HLS parser read the EXT-X-PROGRAM-DATE-TIME value
on manifests, and use it to make sure that segments are inserted at
the correct place in the timeline, when in sequence mode.
Issue #2337
6f274cbc dropped a deprecated Closure build tool, but also upgraded
the Closure compiler and Closure library. This introduced a failure
caused by a duplicate extern in the newer compiler.
This drops the now-unnecessary extern.
<!--
Please remember to:
1. Use Conventional Commits syntax (fix: ..., feat: ..., etc.) in commits and
PR title (https://www.conventionalcommits.org/)
2. Tag any related or fixed issues ("Issue #123", "Closes #420")
3. Sign the Google CLA if you haven't (https://cla.developers.google.com)
You may delete this comment from the PR description.
-->
The depswriter.py tool from google-closure-library was generating
deprecation warnings. This switches to a newer, rewritten version
called google-closure-deps.
Since range elements are special input elements, they must reflect user
interaction, so when the user hovers over the range element, the cursor must be a pointer.
Issue #3220