24 Commits

Author SHA1 Message Date
Álvaro Velad Galván a92699fe4d fix(UI): Fix visibility of the ad statistics panel (#10203) 2026-06-11 10:40:06 +02:00
Álvaro Velad Galván 814aaa718f refactor(UI): Avoid repeated localization.resolve calls (#10155) 2026-05-29 18:58:54 +02:00
Álvaro Velad Galván 686d550a3a feat(UI): Modernize the statistics panel (#10144)
New design:
<img width="866" height="733" alt="Design"
src="https://github.com/user-attachments/assets/403c2ece-3ee0-46de-a310-a1f6adae8929"
/>
2026-05-28 20:45:43 +02:00
Álvaro Velad Galván 1b41275415 refactor(UI): Unify localization and availability updates in Element (#10128) 2026-05-27 10:02:29 +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 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 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 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
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 1c8539698c feat(UI): Modernization of the UI (#8409)
Changes:
- The look has been changed to make it more similar to YouTube:
  - The main background color is now black, and the font is white.
  - Presentation time has been moved to the bottom.
  - Cast and airplay buttons are now more accessible.
  - Tooltips have been enabled except on mobile platforms.
- The ad information has been moved to appear in the same position as
the presentation time when the ad is present.
- A mark indicating the current quality has been added (e.g.: HD, 2K,
4K, 8K)
- The spinner has been replaced with one that works well on Smart TVs
and is very similar to the current one. The animation is included in the
SVG element itself rather than through CSS.
- More LESS variables have been added to make customization easier in
forks.
- The maximum size of the menus is dynamically calculated so that they
never extend outside the video container.
- The size of the subtitle container when the UI appears is now
calculated dynamically.
- The Demo has been updated to show the seekbar when trickplays are
enabled.
- UI performance on Smart TVs has been improved (Tested on Tizen 5.0)
- Many offsets that were hardcoded have been removed, but not all (in
CSS).

Close https://github.com/shaka-project/shaka-player/issues/8406
2025-04-08 13:46:23 +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 5fc0fecd16 feat(UI): Close submenu or context menu on option click (#8193)
Close https://github.com/shaka-project/shaka-player/issues/8192
2025-03-03 08:25:06 +01:00
Álvaro Velad Galván ace9d4aea7 feat(Ads): Add overlayAds to AdsStats (#8068) 2025-02-12 15:30:13 +01:00
Álvaro Velad Galván e7d428a219 fix(UI): Fix show AdStatisticsButton when it's not necessary (#7989) 2025-01-30 12:38:03 +01:00
Álvaro Velad Galván 6fe041c679 chore: Stop using "Object" in UI annotations (#7945)
Related to #1672
2025-01-24 16:23:22 +01:00
Álvaro Velad Galván 4bb07c3e67 chore: Stop using "Object" in UI annotations (#7936)
Related to https://github.com/shaka-project/shaka-player/issues/1672
2025-01-24 11:18:33 +01:00
Wojciech Tyczyński 6e55a3b21b build: Forbid using dot in generic types (#7904)
Fixes #2643

Happy reviewing!
2025-01-20 09:39:51 +01:00
Wojciech Tyczyński 82f7eafdc5 build: Add new JSDoc rules to ESLint (#7897)
Adds a replacement for removed JSDoc checks from ESLint v9.
Additionally fixes lots of issues found in the JSDoc, such as:
- missing `@param`/`@return` annotations
- bad formatting
- params order
- param name in the same line as type definition (tried to disable it,
but it was causing other issues and we didn't have lots of places with
such formatting)

Minor fixes in code found by Closure Compiler after fixing JSDoc are
also included.
2025-01-17 09:28:19 +01:00
Álvaro Velad Galván 4e6e37c0ce feat(UI): Add close button to statistics panel (#7482) 2024-10-23 21:31:36 +02:00
Álvaro Velad Galván e39defb6f7 feat(Ads): Remove circular dependency (#6868)
To eliminate `* @suppress {missingRequire}` it was necessary to create a
new class with the constants and deprecate the old ones. That's why this
change is feat.
2024-06-20 07:51:58 +02:00
Álvaro Velad Galván 037d4cbb7e feat(Ads): Add averageLoadTime and errors to ad stats (#6828) 2024-06-18 19:13:24 +02:00
Álvaro Velad Galván ea8202805a feat(UI): Add ad statistics button (#6827) 2024-06-17 10:50:09 +02:00