Commit Graph

807 Commits

Author SHA1 Message Date
Aditya Mishra 415ebdc52e feat(UI): Add live subtitle style preview on hover (#10077) 2026-05-12 13:24:17 +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 19b2c10bd4 feat: Add timeToFirstFrame to stats (#10065) 2026-05-07 20:28:17 +02:00
Dawid Laskowski 038b3ce1d7 fix(UI): check if ad is linear before updating mute label and icon (#10044)
When linear ad was muted and there is still nonlinear ad mute button is
stuck with status of linear ad instead of video, this change fixes it
2026-05-04 10:17:32 +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 18af32c1a2 feat(UI): Use UI language to display languages names (#10036) 2026-04-28 11:14:38 +02:00
Álvaro Velad Galván 24ab2be1aa feat(UI): Support repeat modes in loop button when using QueueManager (#10027) 2026-04-24 10:12:11 +02:00
Andy(김규회) f1c0468f70 feat(UI): Improve shaka player UI accessibility (#10023)
### ARIA attributes
  - Add `aria-hidden="true"` to all decorative SVG icons (`icon.js`)
- Implement missing `aria-label` for ad controls (`skip_ad_button.js`,
`ad_info.js`)
- Add `aria-pressed` to toggle buttons (mute, fullscreen, pip, loop,
statistics, remote, stereoscopic)
- Remove incorrect `aria-pressed` from one-shot action button
(`recenter_vr.js`)
- Add `role="menu"`, `aria-haspopup`, `aria-expanded` to menus
(`overflow_menu.js`, `settings_menu.js`, `context_menu.js`)
- Add `role="menuitemradio"` and `aria-checked` to selection menus
(resolution, language, text, playback rate, etc.)
- Add `role="toolbar"` to control panel (`controls.js`)
- Add `role="heading"` to content title (`content_title.js`)
  
### Focus management
- Restore focus to trigger button when menus close
  - Maintain focus on fullscreen button after toggle     

 ### CSS
- Add `forced-colors` media query for Windows high contrast mode
  ### Other
- Add `alt=""` to seek bar thumbnail image
- Add `aria-hidden="true"` to watermark canvas
  - Add accessibility unit tests for ARIA attributes
- Remove redundant `aria-hidden` from checkmark icon (`ui_utils.js`)
  - Add ARIA terms to project spell-check dictionary  

Issue https://github.com/shaka-project/shaka-player/issues/3146
2026-04-23 14:53:23 +02:00
Álvaro Velad Galván b0e3015962 feat(UI): Allow custom format and imageQuality in takeScreenshot and copyVideoFrameToClipboard (#10012) 2026-04-22 10:13:53 +02:00
Álvaro Velad Galván 82e914740c fix(UI): Fix parent param type in shaka.ui.Icon constructor (#10014)
Fixes https://github.com/shaka-project/shaka-player/issues/10013
2026-04-21 11:38:56 +02:00
Álvaro Velad Galván e0808e7dad fix(UI): Fix wrong wheel directions on volume bar (#10001) 2026-04-20 10:29:27 +02:00
Álvaro Velad Galván d07037bb66 perf(UI): Skip touch listeners when maxTouchPoints is 0 (#9981) 2026-04-15 17:45:53 +02:00
Álvaro Velad Galván 51d32562c2 feat(Queue): Add metadata support in queue items (#9952) 2026-04-10 11:38:21 +02:00
Álvaro Velad Galván 406729873b chore: Add shaka.util.VideoFrameCallbackHandler helper (#9950)
It encapsulates and simplifies the use of requestVideoFrameCallback and
cancelVideoFrameCallback

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2026-04-09 14:28:40 +02:00
Álvaro Velad Galván 8d5f33ee65 fix(UI): Improve touch handling for single and double tap actions (#9944)
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2026-04-08 12:42:20 +02:00
Álvaro Velad Galván b6a0c05c61 fix(UI): Improve touch handling for single and double tap actions (#9937) 2026-04-07 12:14:02 +02:00
Álvaro Velad Galván 6c286b6ad4 fix: Include isSwitchingContent in UnloadingEvent when load replaces existing content (#9934)
Fixes https://github.com/shaka-project/shaka-player/issues/9922
2026-04-07 11:06:49 +02:00
Álvaro Velad Galván 8ef8334450 feat(UI): Enable seekOnTaps on touch-enabled desktop devices (#9935) 2026-04-06 20:21:11 +02:00
Álvaro Velad Galván f205d4e576 fix(UI): Fix seek using keyboard when the UI is hidden (#9933)
Fixes https://github.com/shaka-project/shaka-player/issues/9923
2026-04-06 20:20:43 +02:00
MultiViewer 5717432206 feat(ui): add customTrackLabel callback for overriding track labels (#9904)
## Summary
- Adds a `customTrackLabel` callback to the UI configuration that allows
overriding track labels for both audio and text tracks
- The callback receives the default label (or `null` if the language was
unrecognized), the track object, and a type string (`'audio'` or
`'text'`)
- Returning a string overrides the label; returning falsy keeps the
default behavior

Fixes #9821

## Example usage
```javascript
ui.configure({
  customTrackLabel: (defaultLabel, track, type) => {
    if (track.language === 'fx') return 'Sound Effects';
    return null; // use default
  }
});
```

## Test plan
- Added integration tests verifying label override, null for
unrecognized languages, type argument, and fallback behavior
- Tests pass in both compiled and uncompiled modes

## AI Disclosure
As highlighted in the new `AGENT-ATTRIBUTION.md`, I've added Claude as a
co-author of the commit as I made use of it during this PR.

Signed-off-by: F1 MultiViewer <f1multiviewer@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-29 14:18:06 -07:00
Álvaro Velad Galván ab317c0b26 fix(UI): Fix display chapter images on chapter selector. (#9889) 2026-03-25 09:45:55 +01:00
Álvaro Velad Galván 01165e5fb2 feat(UI): Enable volume adjustment via mouse wheel on VolumeBar (#9888) 2026-03-24 18:17:13 +01:00
Álvaro Velad Galván 14075963d0 fix(UI): Fix display "live" label on streams without seek bar (#9891)
Regression of
https://github.com/shaka-project/shaka-player/commit/3419e29c1b285c2483f8e85ade45a5e50e1b049b
2026-03-24 17:42:34 +01:00
Álvaro Velad Galván 59afe8a2eb fix(UI): Ensure consistent language names with languageDisplay 'standard' (#9887) 2026-03-24 17:29:06 +01:00
Álvaro Velad Galván c03026f64c feat(UI): Add mediaSession.allowAutoPiP config (#9885)
See:
https://developer.chrome.com/blog/automatic-picture-in-picture-initiated-by-the-browser
2026-03-24 13:22:27 +01:00
Álvaro Velad Galván b41d79cefd fix(UI): Fix tooltip text on subtitle position and size buttons (#9886) 2026-03-24 13:09:25 +01:00
Álvaro Velad Galván f7f28bec4a feat(UI): Add fastSeek support for MediaSession seekTo (#9884) 2026-03-24 12:02:34 +01:00
Álvaro Velad Galván 3419e29c1b fix(UI): Fix delay updating the styles while seeking (#9847)
Fixes https://github.com/shaka-project/shaka-player/issues/9842
2026-03-20 10:42:58 +01:00
Álvaro Velad Galván 2e266d6761 fix(UI): Fix delay updating the styles after seeks (#9846)
Fixes https://github.com/shaka-project/shaka-player/issues/9842
2026-03-19 13:32:15 +01:00
Andy(김규회) a7a37f50cb fix(UI): sync seekbar on timestamp position value between mousemove and onChange in firefox (#9840)
### Problem
The hover tooltip(mousemove) and the click tooltip(onChange) used
different formulas to calculate position.

- mousemove: `const mousePosition = Math.max(0, event.clientX -
rect.left);``
- onchange: `const position = (value - min) * scale + thumbSize / 2;`

### Fix

Extract a shared `showThumbnailAtValue_()` method so that both hover and
click use the same vlaue -> position formula


### Firefox with long term video


https://github.com/user-attachments/assets/97ea4b98-800c-4df0-8795-d5af2e311e4c

### Firefox with short term video


https://github.com/user-attachments/assets/b829cb5d-a531-4772-a320-b10a059af45a

Related Issues to #9327 
Related PR to #9827, #9818
2026-03-19 09:54:59 +01:00
Álvaro Velad Galván 268fb19719 feat(UI): Add showMenusOnTheRight config (#9838)
Close https://github.com/shaka-project/shaka-player/issues/9833
2026-03-18 13:17:24 +01:00
Álvaro Velad Galván 7669984cfa fix(UI): Close overflow and settings menus when user seeks (#9834)
Fixes https://github.com/shaka-project/shaka-player/issues/9832
2026-03-17 19:15:09 +01:00
Andy(김규회) 3de29d45d3 fix(UI): sync seek position with hover and onChange timestamp using consistent position calculation (#9827)
### Problem

Previously, click/drag in the seek bar relied on the browser's default
range entry event. The hover preview used 'getValueFromPosition()'
separately. This resulted in a mismatch between the hover timestamp and
the actual search position, This problem was particularly noticeable in
long videos.

### FIx

I modified to call `getValueFromPosition()` directory even when
click/drag. However click, drag, and touch all go through the same
function, so timestamp previews and navigation positions are always
sychronized.

In addition, I also fixed a bug where the tooltip moves instaneously
when clicking by reflecting the thumbWide correction when we reverse the
tooltip position to value in `onChange()`.

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2026-03-16 09:56:38 +01:00
Andy(김규회) 6ee5d38f10 fix(UI): sync seek position with hover timestamp using consistent position calculation (#9818)
## Problem

Previously, click/drag in the seek bar relied on the browser's default
range entry event. The hover preview used 'getValueFromPosition()'
separately. This resulted in a mismatch between the hover timestamp and
the actual search position, This problem was particularly noticeable in
long videos.

## Fix

When the mouse is down, 'e.Use preventDefault()` to block the browser's
default calculation, 'setBarValueForMouse_()' which follows the same
pattern as the existing 'setBarValueForTouch_()' Add a function to
directly call 'getValueFromPosition()' when clicking and dragging I did,
now hover, click, drag, touch all go through the same function, so
timestamp The preview and navigation positions are always synchronized.

In addition, the hard-coded 'thumbWide = 12' is 'thumbRadius = 6'
('range_elements.less') I modified it to the defined '@thumb-size') and
the browser changed the thumb [[rect.left + thumbRadius, rect.right -
thumbRadius]]' only within the range of '[rect.left + thumbRadius]',
Reflected the offset value when the click position was
reverse-calculated as a value.

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2026-03-12 11:00:53 -07:00
Álvaro Velad Galván 00f5cf612b feat(UI): Enrich the chapter selection menu with thumbnails if the chapter does not have an image (#9811) 2026-03-11 19:52:59 +01:00
Álvaro Velad Galván 93080cd9d3 fix(UI): Add a gap to settings menu to avoid overlapping with the edge of the video (#9765)
Before:
<img width="863" height="372" alt="Before"
src="https://github.com/user-attachments/assets/1f5876fc-8e6c-441a-9948-b2f39041d9f4"
/>

After:
<img width="863" height="372" alt="After"
src="https://github.com/user-attachments/assets/98823e15-2217-4820-b2a1-b51017093c5a"
/>
2026-02-27 06:20:47 +01:00
Álvaro Velad Galván fd5dac0798 feat(UI): Add support for chapter images in MediaSession (#9761)
Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
2026-02-26 10:54:08 +01:00
Álvaro Velad Galván df3caa4bab feat(UI): Modernize Watermark (#9759)
- Use EventManager instead of addEventListener
- Fix canvas resizing in edge cases
- Change default watermark type from static to dynamic
- Add smoother, configurable dynamic watermark animation
2026-02-26 10:05:49 +01:00
Álvaro Velad Galván 5b2eb37659 feat(UI): Add showUIOnPaused config (#9751)
Close https://github.com/shaka-project/shaka-player/issues/9750
2026-02-23 17:21:34 +01:00
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