Commit Graph

401 Commits

Author SHA1 Message Date
Ivan 921206dc1d feat: transmux in a worker (#9914)
This PR introduces a Web Worker for transmuxing resolving
https://github.com/shaka-project/shaka-player/issues/1735

- The worker bundle is compiled separately
- The build output is embedded as a string constant and then wrapped in
a Blob to create an inline Worker URL (HLS.js does this very similarly)
- `TransmuxerProxy` is created wrapping a real transmuxer, but no worker
is started yet - on the first `transmux()` call, it checks if the device
supports worker transmuxing
- For each transmux() call: the buffer is copied, then zero-copy
transferred to the worker. A PublicPromise is stored under a reqId with
a timeout timer, and the main thread awaits it.
- The worker transmuxes and posts back transmuxed (or error). The shared
message listener routes the response to the right proxy instance by id,
which resolves the promise and cancels the timer.
- When the last proxy instance is destroyed, the worker is terminated
and the blob URL is revoked.
  loaded inside the worker.
- Some low-end devices have been excluded since their Worker support is
questionable

There most likely is a better way to do this - please let me know
2026-05-27 21:51:03 +02:00
Álvaro Velad Galván f367ee5ffa feat(Queue): Add M3U playlist loading support (#10115) 2026-05-27 13:29:19 +02:00
Álvaro Velad Galván a7f062a6ef feat(UI): Add QueueButton for queue navigation (#10124) 2026-05-26 09:38:42 +02:00
Joey Parrish fe206c54b7 docs: Fix missing details on TextDisplayer in upgrade docs (#10116) 2026-05-21 11:17:05 -07:00
Joey Parrish fe615d5287 docs: Clean up upgrade doc (#10095)
- Remove duplicate entry in the 5.0 list
- Rename the 5.1 list as 6.0 (named for the version in which something
is removed, with a note about the deprecation version)
 - Reindent the set of related config changes

Noticed while preparing CAF for 5.0 compatibility
2026-05-16 09:36:58 +02:00
Álvaro Velad Galván b8cfc1e311 docs: Copy tutorial content referenced in upgrade guide from older branches into the repo (#10072)
Issue: https://github.com/shaka-project/shaka-player/issues/9984
2026-05-13 07:47:45 +02:00
Álvaro Velad Galván fd4b1cd451 feat(UI): add always-visible skip buttons for big button layout with disabled state (#10062) 2026-05-08 10:11:21 +02:00
Álvaro Velad Galván 2b117f6af4 docs: add QueueManager tutorial (#10063) 2026-05-06 21:30:40 +02:00
Álvaro Velad Galván e0ee1190b8 docs: add MoQ tutorial (#10064) 2026-05-06 21:10:01 +02:00
Álvaro Velad Galván 64dc7097c9 feat(UI): Add new play_pause_buffering button (#10039)
This new button is used on Mobile and SmartTV and eliminates the overlap
between the spinner and the play/pause button.

Before in mobile: 
<img width="863" height="494" alt="imagen"
src="https://github.com/user-attachments/assets/3db9f369-4d1f-49e4-b918-037b8078d7af"
/>

After in mobile:
<img width="863" height="494" alt="imagen"
src="https://github.com/user-attachments/assets/c64390f0-6981-4750-8aad-0e4622134513"
/>
2026-04-29 11:31:43 +02:00
Álvaro Velad Galván 830f6ff904 docs: Remove appspot references from FAQ (#9987)
Issue https://github.com/shaka-project/shaka-player/issues/9984
2026-04-16 11:18:00 +02:00
Joey Parrish 7105a9198e chore: Remove appspot references from source (#9985)
Issue #9984
2026-04-15 16:26:36 -07:00
Álvaro Velad Galván 4706d5f286 feat: Add subtitleDelay config for manual subtitle timing offset (#9939) 2026-04-07 12:15:21 +02:00
Andy(김규회) c7368024ae feat: Select default track by a list of preferences (#9542)
I went ahead and implemented the full structured preference system that
was discussed in
https://github.com/shaka-project/shaka-player/issues/1591.
Instead of just expanding languages to arrays, I replaced all 14
individual preference fields with 3 structured arrays:

```tsx
  preferredAudio (language, role, label, channelCount, codec, spatialAudio)
  preferredText (language, role, format, forced)
  preferredVideo (label, role, codec, hdrLevel, layout)
```

Each array entry works as an AND filter - so you can say things like "I
want Korean with 5.1 surround, but if not available, English is fine
too":

```tsx
player.configure('preferredAudio', [
  {language: 'ko', channelCount: 6},
  {language: 'ko'},
  {language: 'en'},
]);
```

<img width="1728" height="965" alt="image"
src="https://github.com/user-attachments/assets/7b088150-139b-475e-bdba-5bc77dd4e524"
/>

**Config** - Replaced the 14 individual fields with 3 arrays of typed
preference objects (AudioPreference, TextPreference, VideoPreference).
The old fields still work at runtime with a deprecation warning, so
existing apps won't break immediately.

**Demo** - The demo config UI now shows inline expandable preference
lists instead of flat text inputs. You can add/remove entries and
configure each field per entry. URL hash serialization was updated to
use JSON format, with legacy param fallbacks preserved.
2026-02-20 10:12:08 +01:00
Álvaro Velad Galván 706171b5ed docs: Fix v5 on upgrade.md (#9703) 2026-02-12 15:30:47 +01:00
Álvaro Velad Galván 02f579fe22 feat: Add HDR and screen size detection on Titan OS (#9700) 2026-02-12 13:33:54 +01:00
Álvaro Velad Galván a10287e3f0 feat!: Require apps to call updateStartTime instead of setting media element currentTime directly during startup (#9668)
This change is feat! because it no longer allows modifying the
`currentTime` of the mediaElement in the streaming event. With this
change, only `updateStartTime` can be called to update the time, and the
user should always use the `canupdatestarttime` event instead of
`streaming` event when they need it.

Fixes https://github.com/shaka-project/shaka-player/issues/9661
2026-02-05 20:26:33 +01:00
Matthias Van Parijs 2db6038e74 feat!: Remove setTextTrackVisibility from the public API (#9664)
We previously deprecated setTextTrackVisibility, this PR removes it from
the public API.

This'll allow us to further strip down the distinction between selecting
a text track and toggling its visibility internally. Atleast we'll no
longer have users rely on this API from v5 onwards.

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2026-02-05 15:39:50 +01:00
Theodore Abshire f84b6f0505 docs: Clean up / standardize wording of v5.0 upgrade guide (#9662) 2026-02-04 13:56:19 -08:00
Álvaro Velad Galván 514246c8de feat(UI)!: Remove airplay button (#9654)
`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>
2026-02-04 11:28:17 +01:00
Álvaro Velad Galván 3fd73ce941 feat(UI)!: Add bigButtons config and remove addBigPlayButton config (#9636)
- 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
2026-02-02 09:56:43 +01:00
Álvaro Velad Galván 0c0c2ffe29 feat(UI)!: Enable customContextMenu by default on desktop browsers (#9635)
statistics and ad_statistics are added by default to context menu only
on debug builds
2026-01-30 12:03:26 +01:00
Álvaro Velad Galván 023111f6e3 feat(UI)!: Add documentPictureInPicture config (#9634)
- Remove preferDocumentPictureInPicture config
- Add two new configs: disallowReturnToOpener and
preferInitialWindowPlacement
2026-01-29 20:38:36 +01:00
Wojciech Tyczyński 5c05132772 feat!: Use shared logic for MediaError details (#9594) 2026-01-22 20:50:32 +01:00
Satoshi 989392fb4c docs: align description with README (DASH and HLS support) (#9574)
The previous description suggested that Shaka Player was a DASH-only
player.

In reality, Shaka Player supports multiple adaptive streaming formats,
including DASH and HLS.
This change updates the documentation to accurately reflect the player's
capabilities and align it with the README.
2026-01-20 12:38:50 +01:00
Álvaro Velad Galván 6e23b401ed feat(UI): Enable doubleClickForFullscreen for mobile (#9566)
Close https://github.com/shaka-project/shaka-player/issues/9555
2026-01-16 12:00:42 +01:00
Álvaro Velad Galván 6ba19b2af4 feat(UI): Add subtitle size button (#9530) 2025-12-19 14:09:20 +01:00
Álvaro Velad Galván c6e6082bc2 feat: Allow override subtitle position (#9522)
Close https://github.com/shaka-project/shaka-player/issues/9521

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-12-19 13:38:33 +01:00
Tobias Taschner 7e316bc8b2 docs: Update offline.md with persistent license details (#9528)
Clarified the support for persistent licenses with the recent removal of
persistent licenses with Chrome v143 on desktop.
2025-12-18 17:56:17 -08:00
Álvaro Velad Galván d5be5d6f45 feat!: Text displayers should receive a shaka.Player pointer (#9515)
Related to https://github.com/shaka-project/shaka-player/issues/9301
2025-12-17 10:11:00 +01:00
Álvaro Velad Galván 86bfea08aa feat!: Move speech to text to the accessibility section in config (#9507) 2025-12-16 12:37:44 +01:00
Álvaro Velad Galván 1ace441355 feat: Handle forced subtitles automatically by default (configurable) (#9497)
Close https://github.com/shaka-project/shaka-player/issues/9489

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-12-16 09:40:58 +01:00
Álvaro Velad Galván 687f0ee26e feat(ABR): Remove abr.removeLatencyFromFirstPacketTime config (#9496)
Close https://github.com/shaka-project/shaka-player/issues/9475
2025-12-12 10:30:17 +01:00
Matthias Van Parijs 73ee27bf17 feat!: Remove autoShowText and simplify initial text track selection (#9435)
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.
2025-12-12 09:41:15 +01:00
Mudit Jain 49a4d56267 feat(FairPlay): Add support for Gumlet (#9396) 2025-11-26 12:39:20 +01:00
Wojciech Tyczyński b0c77a2adc docs: Remove obsolete message from monetization document (#9403) 2025-11-19 11:55:20 +01:00
Álvaro Velad Galván 643e2c8b62 feat!: Simplify shaka.ads.AdManager interface (#9357) 2025-11-06 13:29:42 +01:00
Álvaro Velad Galván 4bc2518e29 feat!: Remove LRC, SBV, SSA support (#9330)
Related to https://github.com/shaka-project/shaka-player/issues/9321
2025-11-04 20:07:02 +01:00
Álvaro Velad Galván e85b648ef0 feat!: Remove MSS support (#9329)
Related to https://github.com/shaka-project/shaka-player/issues/9321
2025-11-04 20:06:44 +01:00
Álvaro Velad Galván 8e0e0d85c1 feat!: Remove setSequenceMode from TextParser plugins (#9326) 2025-10-31 16:14:52 +01:00
Álvaro Velad Galván 75abdc9749 docs(UI): Add info about title and poster (#9317) 2025-10-30 12:28:33 +01:00
Álvaro Velad Galván 7f662a15b9 feat!: Remove enableTextDisplayer from TextDisplayer plugins (#9311)
This is no longer necessary since we have removed
shaka.text.SimpleTextDisplayer
2025-10-29 16:43:06 +01:00
Wojciech Tyczyński 9b430512a5 docs: Update version mentioned (#9305) 2025-10-28 12:07:46 +01:00
Wojciech Tyczyński b2f6b88fe3 ci: Use python3 explicitly (#9288)
As python v3 is now necessary in our build pipeline, use python3
explicitly in CI and tutorials, as not all OSes symlink `python` to
`python3`.
2025-10-27 13:34:51 +01:00
Álvaro Velad Galván 945c57ab77 feat!: Remove all deprecated things (#9162) 2025-10-07 10:52:13 +02:00
Álvaro Velad Galván e6dfa903ef feat(Ads): Add support for tracking urls (#9144) 2025-09-29 21:27:41 +02:00
Álvaro Velad Galván 61d80f6e59 feat: Add automatic subtitles (#9123)
Internally this uses Web Speech API
https://webaudio.github.io/web-speech-api/ and Translator APIs
https://webmachinelearning.github.io/translation-api/

The feature is experimental and disabled by default since Chrome is the
only browser that currently supports it.

Closes https://github.com/shaka-project/shaka-player/issues/9110

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
Co-authored-by: Joey Parrish <joeyparrish@google.com>
Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2025-09-26 13:18:44 +02:00
Wojciech Tyczyński 6d04f7f225 feat(net): Allow request filters to be called multiple times (#9129)
This change allows to execute request filter on every request attempt.
It can be useful i.e. to update credentials when first request fails.

New field `attempt` has been added to `shaka.extern.Request` which
informs which attempt is currently ongoing. This is needed to not do the
unnecessary work multiple times.

HTTP 401 Unauthorized and 403 Forbidden are no longer treated as
immediate critical errors, as tokens can be updated during retry
process.
2025-09-24 11:55:47 +02:00
Álvaro Velad Galván c0b85c7efb feat(UI): Add video type button (#9107)
This button will appear when the loaded stream has two or more video
roles. E.g.: main and sign.
2025-09-18 13:57:21 +02:00
Álvaro Velad Galván dc235fc501 feat: Remove alwaysStreamText config (#9053)
It is no longer necessary since we included NativeTextDisplayer

Original issue:
https://github.com/shaka-project/shaka-player/issues/1332
2025-09-04 14:51:21 +02:00