Commit Graph

7724 Commits

Author SHA1 Message Date
Theodore Abshire a3f4fd40a1 fix(UI): Prevent hidden seek button from interfering with double-tap (#9748)
The hidden seek button has custom behavior that causes it to attempt to
"delay" touch events on it, to wait to see
if they are a double-tap or not.
This interacted with the double click to fullscreen behavior
unfortunately; a single touch was registered, then it was
registered again 500ms later, causing it to be detected as a double-tap
by the controls container.

This PR changes the hidden seek button to ignore `touchend` events that
happen while the controls are transparent, and changes the initial
`touchend` event on the hidden seek button to not propagate down, thus
preventing the doubling behavior without introducing any lag on the
controls appearing.

Fixes #9705
2026-02-23 12:00:08 +01:00
Álvaro Velad Galván 3c45ae007f feat(UI): Show chapter images on seek bar hover if there are no thumbnails (#9741) 2026-02-23 11:28:49 +01:00
Álvaro Velad Galván 04c96f9cc9 feat(UI): Show thumbnails in Chapters button (#9740)
Result:
<img width="864" height="377" alt="Chapters button"
src="https://github.com/user-attachments/assets/0b777974-3592-4c9f-8c75-844ddda588c0"
/>
2026-02-23 09:06:34 +01:00
Álvaro Velad Galván 442ff14164 perf(UI): Optimization of chapter operations (#9739) 2026-02-20 15:04:36 +01:00
Álvaro Velad Galván e59b8b40a7 feat(HLS): Add chapter images (#9738)
Spec:
https://developer.apple.com/documentation/http-live-streaming/providing-javascript-object-notation-json-chapters
2026-02-20 15:04:12 +01:00
Álvaro Velad Galván 88c65c6bbf chore: Reduce the internal complexity of the chapters (#9737)
Instead of saving chapter titles as a URL, they are now saved as a
metadata section that can be expanded in the future.
2026-02-20 11:38:33 +01: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 ab09d4dcd7 fix: Do not update the player position with negative playback rates if the video is paused (#9732) 2026-02-20 10:01:37 +01:00
Álvaro Velad Galván 992f2158e5 chore: Remove shaka.media.IClosedCaptionParser interface (#9731) 2026-02-20 09:58:09 +01:00
Álvaro Velad Galván 42a88bcfaa feat: Remove testing of MSS support (#9733) 2026-02-20 09:52:29 +01:00
gmamzn 548fe2953e fix(TTML): Update position alignment map (#9735)
Map 'start' to 'LEFT' and 'end' to 'RIGHT'
This mapping needs to be reversed for RTL languages.
2026-02-19 14:30:23 -08:00
Álvaro Velad Galván 6826ffa311 feat(CEA): Implement raw CEA-608 packet extraction (#9730)
This format is generated by Apple's HLS tools.
2026-02-19 11:45:18 +01:00
Álvaro Velad Galván e8c8e0ce30 fix(UI): Fix chapters markers size (#9728)
Fixes https://github.com/shaka-project/shaka-player/issues/9704
2026-02-19 09:54:07 +01:00
Álvaro Velad Galván 0a2ff0fe5f chore: Improve device type and browser engine detection (#9727) 2026-02-18 13:38:08 +01:00
Álvaro Velad Galván 26d10492c5 ci: Add concurrency to "Measure Bundle Size" job (#9729) 2026-02-18 13:37:52 +01:00
Álvaro Velad Galván ff7cea5b96 fix(net): Avoid duplicate progressUpdated in HttpXHRPlugin onload (#9726) 2026-02-18 12:28:29 +01:00
Álvaro Velad Galván 20c0758e11 refactor(net): Improve DataUriPlugin parsing logic (#9724)
- Replace split(':') with startsWith('data:') for scheme validation
- Use indexOf(',') instead of split(',') to avoid unnecessary
allocations
- Remove window dependency from decodeURIComponent
- Normalize base64 detection using toLowerCase()
2026-02-17 13:44:56 +01:00
Álvaro Velad Galván 5abd49cd82 feat: Add requestType and context to download events (#9723)
Close https://github.com/shaka-project/shaka-player/issues/9408
2026-02-17 12:43:26 +01:00
Álvaro Velad Galván 1139a4e42c fix(UITextDisplayer): avoid ResizeObserver loop warning (#9722)
UITextDisplayer was triggering:

  "ResizeObserver loop completed with undelivered notifications"

This happened because updateCaptions_() mutates the DOM inside the
ResizeObserver callback, which can cause synchronous layout feedback
loops.

This change:

- Observes videoContainer_ instead of textContainer_
- Defers updateCaptions_() using requestAnimationFrame
- Coalesces multiple resize events using a pendingResize_ flag
- Ensures updates only run when captions are visible

This prevents layout feedback loops while preserving correct caption
re-rendering behavior.

Fixes https://github.com/shaka-project/shaka-player/issues/9721
2026-02-17 11:03:18 +01:00
Álvaro Velad Galván 56ac70d44a perf(S2T): Improve SpeechToText code (#9718)
Avoid race conditions when using Translator API.
Avoid unnecessary DOM mutations.
Separate responsibilities in the code.
2026-02-17 10:07:29 +01:00
Álvaro Velad Galván 08eb22ffd4 fix(HLS): Support external chapters (chaptersUri config) when load a Media Playlist (#9720) 2026-02-17 09:58:55 +01:00
Álvaro Velad Galván 652f391dc0 feat(UI): Add new TrackLabelFormat: LABEL_OR_LANGUAGE and LANGUAGE_OR_LABEL (#9719) 2026-02-17 09:58:41 +01:00
Álvaro Velad Galván f9db524d9a feat(UI): Display additional information when using TrackLabelFormat.LABEL for audio tracks (#9714)
Close https://github.com/shaka-project/shaka-player/issues/9713
2026-02-16 13:24:36 +01:00
Daisuke Miyajima 1d57fc4ba9 fix(UI): fix presentation time display when display time is larger than duration (#9712)
Fixes #9711
v5.0.2-main v4.16.18-main v4.15.30-main
2026-02-16 09:38:03 +01:00
Álvaro Velad Galván 48b553a595 fix(MSF): Fix CMSF catalog parsing (#9710)
It's better use the packaging instead of the mimetype to check the
compatibility
2026-02-13 16:16:22 +01:00
Álvaro Velad Galván 3948908659 fix(UI): Fix chapter marker issues (#9708)
Fixes https://github.com/shaka-project/shaka-player/issues/9704
2026-02-13 13:57:01 +01:00
Álvaro Velad Galván ffb67bc107 fix(UI): Slight delay in removing chapter title labeling (#9707)
Fixes https://github.com/shaka-project/shaka-player/issues/9706
2026-02-13 10:43:31 +01:00
Álvaro Velad Galván 5a6f1c6ad9 fix(UI): Player automatically enters fullscreen on single tap on mobile (#9709)
Fixes https://github.com/shaka-project/shaka-player/issues/9705
2026-02-13 10:41:17 +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 5362793a10 chore(Demo): Update demo asset (#9702) 2026-02-12 13:32:47 +01:00
Álvaro Velad Galván e57a5091f0 fix: Validate that mediaElement.getStartDate returns a Date (#9701)
Fixes https://github.com/shaka-project/shaka-player/issues/9672
2026-02-11 18:19:41 +01:00
Álvaro Velad Galván 5c8ffe4565 fix: Fix video freezes when seeking to the end when the audio and video duration are slightly different (#9695)
Fixes https://github.com/shaka-project/shaka-player/issues/9673
2026-02-11 15:26:40 +01:00
Álvaro Velad Galván 59f38310a3 fix: Fix usage of mediaElement in shaka.Player constructor (#9698)
This should have been removed in version 5, but we did it wrong, so we
have to add it back.

I'm removing the deprecated log and throwing an `alwaysWarn` because
this change could break many more applications than we want, given that
the second parameter is `videoContainer` and we could do something
wrong.
2026-02-11 13:24:32 +01:00
Álvaro Velad Galván f8abc76dcf docs: Fix NO_VIDEO_ELEMENT doc on v5 (#9697) 2026-02-11 13:16:48 +01:00
Álvaro Velad Galván 123d665e39 feat: Add basic support to Titan OS (#9696)
User Agent info: https://docs.titanos.tv/user-agents
2026-02-11 12:43:41 +01:00
Álvaro Velad Galván 7d7e8eb9ba chore(Demo): Update 'Live sim (CBCS single key)' asset (#9693)
Now the asset supports FairPlay
2026-02-10 12:05:01 +01:00
Álvaro Velad Galván 9cef117f4e feat: Remove com.widevine.alpha.experiment from probeSupport (#9687)
https://chromium-review.googlesource.com/c/chromium/src/+/7552797
2026-02-09 17:06:26 +01:00
Álvaro Velad Galván 7d0422d69a fix: Fix CryptoKey definition (#9686)
Fixes https://github.com/shaka-project/shaka-player/issues/9685
2026-02-09 16:37:40 +01:00
Álvaro Velad Galván f9ce5ce3cb fix: Allow MSE ended in canPerformOperations_ (#9683)
Fixes https://github.com/shaka-project/shaka-player/issues/9681
v5.0.1-main v4.16.17-main v4.15.29-main
2026-02-09 10:22:02 +01:00
Álvaro Velad Galván 943a5f5e97 feat(HLS): Add CAN-SKIP-DATERANGES support (#9679)
Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
2026-02-09 09:47:00 +01:00
Shaka Bot 12aeb5b35a chore(main): release 5.0.0 (#9028) v5.0.0 2026-02-06 13:05:17 +01:00
Álvaro Velad Galván ebcf0feb98 fix: Correctly destroy enqueue blocking operations (#9677)
Fixes https://github.com/shaka-project/shaka-player/issues/9639
2026-02-06 11:27:38 +01:00
Álvaro Velad Galván af02b6e00c docs: Update docs for v5.0 release (#9675) 2026-02-06 07:32:03 +01:00
Álvaro Velad Galván 4082ed75ee feat(DASH): Add support for SegmentTimeline@Pattern (#9669)
Close https://github.com/shaka-project/shaka-player/issues/9659
2026-02-06 07:31:49 +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
Andy(김규회) d98169bc25 feat(EME): Add retryLicensing() and failureCallback for manual license retry (#9638)
So basically, when a license request fails (eg. network Error, server
down whatever), apps can now retry from scratch by calling
`player.retryLicensing()`. This was tricky to implement because of EME
spec limitations: `generateRequest()` can only be called once per
session. So if it fails, it would be stuck.

So I close the old session and create a brand new one with the same
`initData`

> Will Video element throw an error during this process?

we were worried that closing the session would leave the video without
keys for a brief moment, potentially triggering errors. But in practice,
the transition is fast enough( I added a 0.1s delay for CDM clean up)
and the video element handles it gracefully

> Will new encrypted event fire? If not, will it limit this feature?

The encrypted event only fires when the browser first encounters
encrypted content. When we close and recreate a session, the content is
already loaded, so no new event

Solutions: In `CreateSession()` metadata store `initData` and
`initDataType` in the session metadata when the session is first
created. So when `retryLicensing()`is called, we just grab the stored
data and pass it to `generateRequest()` on the new session. No need to
wait for an `encrypted` event at all.

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2026-02-05 14:12:30 +01:00
Álvaro Velad Galván c200219fa2 test: Fix UI tests on SmartTVs (#9660)
Tests fixed:

```
  UI Customization
    ✗ big buttons only created when configured [Safari 3.0 (Tizen 3.0)]
	Error: Expected 1 to be 0.
	    at <Jasmine>
	    at Function.confirmElementMissing (test/test/util/ui_utils.js:70:29 <- test/test/util/ui_utils.js:139:31)
	    at _callee6$ (test/ui/ui_customization_unit.js:86:13 <- test/ui/ui_customization_unit.js:152:21)
	    at tryCatch (node_modules/@babel/polyfill/dist/polyfill.js:6473:40)
  UI
    controls
      controls-button-panel
        ✗ has default elements [Safari 3.0 (Tizen 3.0)]
	Error: Expected 1 to be 0.
	    at <Jasmine>
	    at Function.confirmElementMissing (test/test/util/ui_utils.js:70:29 <- test/test/util/ui_utils.js:139:31)
	    at _callee15$ (test/ui/ui_unit.js:425:19 <- test/ui/ui_unit.js:506:27)
	    at tryCatch (node_modules/@babel/polyfill/dist/polyfill.js:6473:40)

```
2026-02-05 07:09:13 +01:00
Álvaro Velad Galván 2562fcbb5c perf: Improve startup performance of LiveSeekableRange operations (#9665)
Fixes https://github.com/shaka-project/shaka-player/issues/9639
2026-02-05 07:08:51 +01:00