Commit Graph

18 Commits

Author SHA1 Message Date
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 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 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 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 b1a7e7bb64 feat: Disable remote usage on TV, CONSOLE and CAST devices (#9375) 2025-11-07 16:48:16 +01:00
Phyo Wai Lin e7b1e5a0f6 feat(UI): Ability to change UI icons (#9115)
## How to register a custom icon?

**Icons need to be registered before initializing the player.**

Register a custom icon from  Material Symbols:

```js
shaka.ui.IconRegistry.register('<PATH_VALUE>');
```

Register a custom Icon from any icon set:

```js
shaka.ui.IconRegistry.register('<NAME>', {
  path: '<PATH_VALUE>',
  viewBox: '<VIEW_BOX>',
  size:  24, // optional
});
```

Register a custom Icon (that contains multiple paths) from any icon set:

```js
shaka.ui.IconRegistry.register('<NAME>', {
  path: ['<PATH_VALUE_1>', '<PATH_VALUE_2>'],
  viewBox: '<VIEW_BOX>',
  size:  24, // optional
});
```

Register a custom Icon using URL of the icon:

```js
shaka.ui.IconRegistry.register('<NAME>', {
  url: '<URL>',
  size:  24, // optional
});
```

Closes: #9045

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2025-09-19 11:59:17 +02:00
Phyo Wai Lin 7d61334759 feat(UI): Replace icon font with SVG icons (#8986)
* Update all UI components to use SVG icons instead of icon fonts
* Adjust some icon sizes to 32px

Replacing icon fonts with inline SVGs removes the loading delay caused
by font fetching. Icons now appear immediately with zero delay.

Close https://github.com/shaka-project/shaka-player/issues/2467
2025-08-19 12:40:53 +02:00
Álvaro Velad Galván 30166a631b fix(UI): Fix unhandled rejection on remote button (#8778) 2025-06-21 07:21:55 +02:00
Wojciech Tyczyński 970d7756ea feat: Add Device API (#8210)
The goal is to simplify and abstract feature logic detection. Currently
lots of places depend on various calls to `shaka.util.Platform` and
mainteinance of this is hard & not easy to read.

By introducing device API ideally rest of the player logic would look
into device features instead of directly checking platform. Additionally
we can more easily cache needed values, so we won't have to parse user
agent several times anymore.

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2025-06-02 13:46:40 +02:00
Álvaro Velad Galván 09d2041b50 fix(UI): Show the remote button when we already connected (#8461) 2025-04-15 15:48:46 +02:00
Álvaro Velad Galván 03fd784055 fix(UI): Check remote availability on remote button (#8453) 2025-04-14 11:07:01 +02:00
Álvaro Velad Galván ea0790727d fix(UI): Don't allow click on the buttons when the UI is not visible (#8396) 2025-04-04 12:32:17 +02:00
Álvaro Velad Galván 75709351c8 fix: Remove isSafari and always use isApple (#8104)
This replacement is safe to do and also reduces the number of internal
operations to obtain the result.
2025-02-19 10:07:35 +01:00
Álvaro Velad Galván edb9e532ba fix(AirPlay): Show AirPlay button when starting the playback with AirPlay (#7515) 2024-10-29 07:15:39 +01:00
Álvaro Velad Galván c8bcfdb7e9 fix(UI): Fix remote button availability and icon (#7513) 2024-10-28 11:50:07 +01:00
Wojciech Tyczyński 96da45a182 fix(UI): Restore missing AirPlay button (#7389) 2024-10-03 10:15:46 +02:00
Álvaro Velad Galván b66a8e871b fix(UI): Console error on remote.cancelwatchavailability() method in remote playback feature (#5793)
Fixes: https://github.com/shaka-project/shaka-player/issues/5766
2023-10-30 09:10:11 +01:00
Álvaro Velad Galván 1ef5ae0615 feat(UI): Add remote button with RemotePlayback API (#5650)
API: https://developer.mozilla.org/en-US/docs/Web/API/RemotePlayback

Chrome Status: https://chromestatus.com/feature/5778318691401728

Examples: https://avayvod.github.io/remote-playback/test.html and
https://beaufortfrancois.github.io/sandbox/media/remote-playback.html

Tested in Safari (iOS and macOS) and Chrome in Android

About desktop support:
https://bugs.chromium.org/p/chromium/issues/detail?id=728609
2023-09-14 18:17:32 +02:00