Commit Graph

768 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
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 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 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
2026-02-16 09:38:03 +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
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 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 bd167c3744 feat: Add listenMulti and listenOnceMulti to shaka.util.EventManager (#9652)
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2026-02-03 21:49:35 +01:00
Álvaro Velad Galván 333a941b44 feat(UI): Add PiP placeholder with poster and exit icon (#9653)
This is only used in Document PiP
2026-02-03 16:35:46 +01:00
Álvaro Velad Galván fbbfb11674 feat(UI)!: Change buttons order (#9651)
The second to last button should always be overflow menu
2026-02-03 16:12:59 +01:00
Álvaro Velad Galván 99ec36d052 fix(UI): Fix pointer events in some big buttons on small screens (#9650)
Related to
https://github.com/shaka-project/shaka-player/commit/3fd73ce941c8d9df8a9d739dbf8fe6b177dad6f1
2026-02-03 16:12:45 +01:00
Álvaro Velad Galván 60366e794b feat(UI): Add showUIAlways config (#9648)
Close https://github.com/shaka-project/shaka-player/issues/9647

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2026-02-03 11:09:20 +01:00
Álvaro Velad Galván 0542863452 feat(UI): Add chapters marks to seek bar (#9643)
Close https://github.com/shaka-project/shaka-player/issues/9642
2026-02-03 10:33:48 +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 a0384a1939 feat(UI): Adjust context menu positioning to avoid overflow (#9632) 2026-01-30 10:59:42 +01:00
Álvaro Velad Galván 248b831e2f fix(UI): Prevent PiP window size issues by using relative sizing (#9633) 2026-01-30 10:59:33 +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
Álvaro Velad Galván 7c428323a0 feat(UI): Modernize style of big play button (#9630)
Before:
<img width="864" height="688" alt="before"
src="https://github.com/user-attachments/assets/3cf5efbb-ae1e-49e9-b210-81330f81a82f"
/>

After:
<img width="864" height="688" alt="after"
src="https://github.com/user-attachments/assets/2c27e7e6-e2d6-41d2-a074-e262f1da6ca2"
/>
2026-01-29 15:50:08 +01:00
Álvaro Velad Galván 4b679d84fe feat(UI): Improve overflow menu style (#9631)
Before: 
<img width="864" height="696" alt="before"
src="https://github.com/user-attachments/assets/774c29db-41fb-41c1-8ad6-e777675cf043"
/>

After:
<img width="864" height="696" alt="after"
src="https://github.com/user-attachments/assets/860b4b16-7690-406b-ac3f-ae38da879e16"
/>
2026-01-29 15:49:54 +01:00
Álvaro Velad Galván c4a506a83b feat(HLS): Detect new chapter streams added after initial load (#9573)
Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
2026-01-20 11:02:28 +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 bdfd028088 feat(HLS): Support chapters on Live and custom config to add it (#9561)
Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
2026-01-15 09:47:11 +01:00
Álvaro Velad Galván ee970078e9 fix(UI): Update chapters button on live (#9560) 2026-01-14 16:24:50 +01:00
Andy(김규회) 05b09728c7 perf: Use Map.getOrInsert/getOrInsertComputed native methods (#9546)
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>
2026-01-13 10:57:25 +01:00
Álvaro Velad Galván 9e5c1a95e8 feat(UI): Use audio description label when accessibility purpose is visually impaired (#9537) 2025-12-22 16:05:06 +01:00
Álvaro Velad Galván 909655f4eb feat: Add configurationchanged event (#9531) 2025-12-19 16:35:35 +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
Álvaro Velad Galván 2d02ae3f6d feat(UI): Allow all items registered in overflow to be in the context menu (#9527) 2025-12-19 09:23:07 +01:00
Álvaro Velad Galván 9b728fd6b7 fix(UI): Fix show Ad Stats button when it's not necessary (#9525) 2025-12-18 15:50:07 +01:00
Álvaro Velad Galván 0d3f3d0140 feat(UI): Support sub menus on context button (#9526) 2025-12-18 15:49:50 +01:00
Álvaro Velad Galván ee859a6260 fix(UI): Update chapters marks on live (#9509)
This is only possible when using a custom manifest plugin.
2025-12-16 12:37:31 +01:00
Álvaro Velad Galván 7ae5328f22 feat(UI): Add translations for qaa and qad languages (#9501)
Uses meanings of qaa and qad defined in DVB spec, ETSI EN 300 468
V1.17.1 (2022-07), annexes F and J. See
https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.17.01_20/en_300468v011701a.pdf
2025-12-15 21:00:59 +01:00
Soumalya Bhattacharya da7bb4d276 fix(UI): Make Overflow/Settings Menu position dynamic (#9395)
Close #9287

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2025-12-15 10:41:32 +01:00
Álvaro Velad Galván 0f4e849acf fix(UI): Fix position of sub menus (#9485)
Now the submenus are rendered within the overflow menu
2025-12-10 13:28:40 +01:00
Álvaro Velad Galván 12a328779d fix(UI): Avoid layout shift when displaying thumbnails (#9490) 2025-12-10 12:49:04 +01:00
Álvaro Velad Galván ff72abc4f5 feat(UI)!: Improve Media Session management (#9483)
Fixes https://github.com/shaka-project/shaka-player/issues/9478
2025-12-10 11:56:03 +01:00
Álvaro Velad Galván 38054c9968 fix(UI): Show Dolby Vision text for any DV codec (#9487) 2025-12-10 09:57:52 +01:00
Joey Parrish ab16b73614 fix: Improve handling of in-progress content (#9414)
The HLS parser used isLive_() in some places, which was equal to
presentationType_ != VOD, and in other places, checked presentationType_
directly.

In fact, isLive_()'s old formulation was checking for all dynamic
content (live & event types), so it should be called isDynamic_(). But
some usages of the old isLive_() actually only cared about live, and
should exclude event types.

This cleans up usage and clarifies each condition to either strictly
live (excluding VOD & event types) or all dynamic content (live & event,
excluding VOD). This is done both inside and outside the HLS parser.

This also makes one behavioral change to HLS event type streams. These
are now shown as "in progress" (dynamic, finite duration) instead of
"live" (dynamic, infinite duration).

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2025-12-04 09:54:02 +01:00
Álvaro Velad Galván f751ccb409 revert: Revert "fix(UI): Align seek hover and drag time (#9429)" (#9447)
This reverts commit e03b2a98e7.

Related to https://github.com/shaka-project/shaka-player/issues/9327
2025-11-28 16:23:28 +01:00
Álvaro Velad Galván 98895cef47 fix(UI): Show forced subtitles in subtitle selector (#9441) 2025-11-28 10:11:39 +01:00
Álvaro Velad Galván fd2112ba96 feat(UI): Use Intl.DisplayNames to show the language name (#9440)
Fixes the issues of
https://github.com/shaka-project/shaka-player/pull/5365 (see
https://github.com/shaka-project/shaka-player/commit/fc93292d9e4f8d38561dea8320cbcd5fd25f2c75)

Closes https://github.com/shaka-project/shaka-player/issues/9439
2025-11-27 13:10:33 +01:00