It encapsulates and simplifies the use of requestVideoFrameCallback and
cancelVideoFrameCallback
---------
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
I got in touch with some people at TiVo OS and they're willing to help
out with proper device support.
This is a draft as we'll have to figure out the details (eg; max
resolution probing, HDR capabilities) along the way.
Caveats
- Earlier versions of BMW run on Linux, with user agent "Mozilla/5.0
(X11; Linux aarch64) AppleWebKit/573.36 (KHTML, like Gecko)
Chrome/126.1.0.0.0 Safari/537.36 BMW/156", which is TiVo under the hood.
Current implementation wouldn't match this but there's a few config
variables that need to be adjusted (eg; CrossBoundaryStrategy RESET).
- I have yet to check if newer BMW's (run on Android) contain TiVoOS in
their user agent.
- TiVo is a new player in the TV market, they ship their OS with various
vendors. I shall yet have to receive proper info of what runs where.
---------
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Fix a few minor typos and grammar issues across docs and build scripts:
- Fix incorrect alt text in README.md (Kinetoscope -> Shaka Player)
- Fix grammar in shakaBuildHelpers.py docstring (handling -> handled)
- Fix verb tense in docs/style.md (recommended -> recommend)
In TS Transmuxer, Replaces 9 identical inline Mp4SampleFlags object
literals across 7 stream info methods with 3 named constants
(AUDIO_SAMPLE_FLAGS_, VIDEO_KEYFRAME_FLAGS_, VIDEO_NON_KEYFRAME_FLAGS_)
- Reduces duplication and improves readability — each constant makes the
shared object payload referenced
- As a side benefit, eliminates per-frame object allocations during
transmuxing, reducing GC pressure on low-end devices like Tizen/LG etc.
This initial support is complete but not efficient, as it involves
conversion to XML and normal processing. It should only be used for
testing purposes. Improved support will be added in the future.
Tested with https://github.com/Dash-Industry-Forum/dash-json-schema
Note: This is only added to the experimental build.
This handles trusted publishing for Shaka Player.
In addition, it makes a check in shakaBuildHelpers a little broader to
accommodate forked package names (like @joeyparrish/shaka-player-staging
that I have been using to test the workflow updates from my fork).
Issue #9132
Since Firefox in the range 145 to 147 (we jumped from 144 to 147),
running tests in a Windows background service now requires an explicit
flag for headless mode. This fixes the configuration for Selenium.
`airplay` button uses WebKit's proprietary API. In newer versions, this
has been replaced by the RemotePlayback API, which is available in
`remote` button.
More info: https://caniuse.com/mdn-api_remoteplayback
---------
Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
- The following buttons are registered: play_pause, mute, fullscreen,
rewind, fast_forward, picture_in_picture, remote, loop, skip_next,
skip_previous
- SmallPlayButton and BigPlayButton are removed
- The following buttons are used by default on mobile: skip_previous,
play_pause, skip_next
`gendeps.py` is documented in build/readme.md as "required to use the
uncompiled library", which to me sounds like it should work standalone
if you just want to build and test the demo?
https://github.com/shaka-project/shaka-player/blob/main/build/README.md?plain=1#L12
If you check out the repo fresh or remove dist and run
`./build/gendeps.py` it will fail because it depends on locales.js to be
built.
(also, trying to run `./build/generateLocalizations.py` before
`./build/gendeps.py` will fail too if you don't `mkdir -p dist` first.
I might need some guidance here about whether to add a locales CLI
argument. "build/check.py" already runs without this and will generate
locales.js with the default locales, which seems reasonable for this
command.
But it seems error prone to me to both be able to specify locales and to
use date based conditional checks if locales should be rebuilt, because
locales.js can be more recent but generated with different locales.
The "No changes detected" warning applies per output file, but the file
wasn't included in the log, which was confusing to me. In addition to
that, many of the builds depends on locales.js, so the log message got
duplicated several times because of that when you build `./build/all.py`
This PR adds module level caching for build/compiler to avoid repetition
and tries to make the log more informative.
It uses the output file basename, which seems like a safe assumption
currently since the dist output structure is flat. But if this is a deal
breaker maybe we can print the full path or the relative path from the
shaka repo root instead.
This is the log for the most extreme case (`./build/all.py` directly
after another build) before the PR:
```
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Generating Closure dependencies...
[INFO] Linting JavaScript...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Linting CSS...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Linting HTML...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Checking that the build files are complete...
[INFO] Checking for spelling mistakes in js files...
CSpell: Files checked: 578, Issues found: 0 in 0 files.
[INFO] Checking for spelling mistakes in md files...
CSpell: Files checked: 49, Issues found: 0 in 0 files.
[INFO] Checking for spelling mistakes in py files...
CSpell: Files checked: 16, Issues found: 0 in 0 files.
[INFO] Checking the tests for type errors...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Building the docs...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (experimental, debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (ui, debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (compiled, debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (dash, debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (hls, debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the demo app (debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the receiver app (debug)...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (experimental, release)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (ui, release)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (compiled, release)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (dash, release)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the library (hls, release)...
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the demo app (release)...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Compiling the receiver app (release)...
[WARNING] No changes detected, skipping. Use --force to override.
```
With this PR it will print this instead:
```
[WARNING] Detected output files that do not need to be rebuilt. Use --force to override.
[INFO] Skipping locales.js (already built)
[INFO] Generating Closure dependencies...
[INFO] Linting JavaScript...
[INFO] Skipping .lintstamp (already built)
[INFO] Linting CSS...
[INFO] Skipping .csslintstamp (already built)
[INFO] Linting HTML...
[INFO] Skipping .htmllintstamp (already built)
[INFO] Checking that the build files are complete...
[INFO] Checking for spelling mistakes in js files...
CSpell: Files checked: 578, Issues found: 0 in 0 files.
[INFO] Checking for spelling mistakes in md files...
CSpell: Files checked: 49, Issues found: 0 in 0 files.
[INFO] Checking for spelling mistakes in py files...
CSpell: Files checked: 16, Issues found: 0 in 0 files.
[INFO] Checking the tests for type errors...
[INFO] Skipping .testcheckstamp (already built)
[INFO] Building the docs...
[INFO] Skipping index.html (already built)
[INFO] Skipping controls.css (already built)
[INFO] Skipping demo.css (already built)
[INFO] Compiling the library (experimental, debug)...
[INFO] Skipping shaka-player.experimental.debug.js (already built)
[INFO] Skipping shaka-player.experimental.debug.externs.js (already built)
[INFO] Skipping shaka-player.experimental.debug.d.ts (already built)
[INFO] Compiling the library (ui, debug)...
[INFO] Skipping shaka-player.ui.debug.js (already built)
[INFO] Skipping shaka-player.ui.debug.externs.js (already built)
[INFO] Skipping shaka-player.ui.debug.d.ts (already built)
[INFO] Compiling the library (compiled, debug)...
[INFO] Skipping shaka-player.compiled.debug.js (already built)
[INFO] Skipping shaka-player.compiled.debug.externs.js (already built)
[INFO] Skipping shaka-player.compiled.debug.d.ts (already built)
[INFO] Compiling the library (dash, debug)...
[INFO] Skipping shaka-player.dash.debug.js (already built)
[INFO] Skipping shaka-player.dash.debug.externs.js (already built)
[INFO] Skipping shaka-player.dash.debug.d.ts (already built)
[INFO] Compiling the library (hls, debug)...
[INFO] Skipping shaka-player.hls.debug.js (already built)
[INFO] Skipping shaka-player.hls.debug.externs.js (already built)
[INFO] Skipping shaka-player.hls.debug.d.ts (already built)
[INFO] Compiling the demo app (debug)...
[INFO] Skipping demo.compiled.debug.js (already built)
[INFO] Compiling the receiver app (debug)...
[INFO] Skipping receiver.compiled.debug.js (already built)
[INFO] Compiling the library (experimental, release)...
[INFO] Skipping shaka-player.experimental.js (already built)
[INFO] Skipping shaka-player.experimental.externs.js (already built)
[INFO] Skipping shaka-player.experimental.d.ts (already built)
[INFO] Compiling the library (ui, release)...
[INFO] Skipping shaka-player.ui.js (already built)
[INFO] Skipping shaka-player.ui.externs.js (already built)
[INFO] Skipping shaka-player.ui.d.ts (already built)
[INFO] Compiling the library (compiled, release)...
[INFO] Skipping shaka-player.compiled.js (already built)
[INFO] Skipping shaka-player.compiled.externs.js (already built)
[INFO] Skipping shaka-player.compiled.d.ts (already built)
[INFO] Compiling the library (dash, release)...
[INFO] Skipping shaka-player.dash.js (already built)
[INFO] Skipping shaka-player.dash.externs.js (already built)
[INFO] Skipping shaka-player.dash.d.ts (already built)
[INFO] Compiling the library (hls, release)...
[INFO] Skipping shaka-player.hls.js (already built)
[INFO] Skipping shaka-player.hls.externs.js (already built)
[INFO] Skipping shaka-player.hls.d.ts (already built)
[INFO] Compiling the demo app (release)...
[INFO] Skipping demo.compiled.js (already built)
[INFO] Compiling the receiver app (release)...
[INFO] Skipping receiver.compiled.js (already built)
```
Added polyfills for `Map.getOrInsert()` and
`Map.getOrInsertComputed()` from the TC39 upsert proposal and refactor
the codebase to use them.
These methods replace the common "check if key exists, then set default"
pattern with a single atomic operation. This improves code readability
and eliminates redundant map lookups throughout the player.
---------
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
This is the first step in a series of efforts to simplify how we handle
text tracks internally.
The purpose of `autoShowText` has always felt a bit unclear. It was
originally added because Shaka wasn't flexible enough when choosing an
initial text track. I don't think we should try to handle every possible
scenario for initial text track selection. Instead, we should respect
`config.preferredTextLanguage` and let the application decide if it
needs more granular control. Apps can already do this easily with
`getTextTracks()` and `selectTextTrack(track)`.
Ultimately, I'd like to move toward a simpler API where either a text
track is selected or none is. If nothing is selected, we shouldn't
stream any text at all.
See https://github.com/shaka-project/shaka-player/issues/9301 for extra
context.
The Closure compiler infers that methods without an explicit `@return`
annotation return `undefined` but Clutz uses `any` instead, which means
that in the TypeScript defintions shipped with shaka-player all of those
methods ruturn `any`. These changes add an extra step to the externs
generation script that adds explicit `@return {undefined}` annotations
to methods without returns. This fixes it for about 180 methods (varies
depending on the build type), all manually written externs or classes
that implement or extend from the manually written externs will still
use `any`.
Homebrew builds of openjdk include a version like "25" instead of
"25.0.0". This fixes the parser that extracts this version number in our
build scripts.
Spec: https://www.svta.org/product/svta2053-2/
A new admanager has been created to manage this.
The new admanager works with SSAI and SGAI.
This new ad manager essentially manages ad tracking, but it's also
possible to have all ad events and disable tracking via configuration.