Commit Graph

29 Commits

Author SHA1 Message Date
Álvaro Velad Galván 1b41275415 refactor(UI): Unify localization and availability updates in Element (#10128) 2026-05-27 10:02:29 +02:00
Álvaro Velad Galván 19b2c10bd4 feat: Add timeToFirstFrame to stats (#10065) 2026-05-07 20:28:17 +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 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 2ceeec33d1 fix(UI): Show hours in time statistics (#9410) 2025-11-20 15:58:33 +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 cbcba99ecd feat(Stats): Add current codecs to stats (#8418)
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-04-08 18:52:12 +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
Wojciech Tyczyński 1c421905ff fix(UI): Display max segment duration in seconds (#8305) 2025-03-20 14:19:13 +01: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 88160863c8 fix(UI): Show GB unit in StatisticsButton (#7990) 2025-01-30 12:08:48 +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 ba369584bd fix(UI): Don't enable StatisticsButton when create overflow menu (#7481) 2024-10-23 20:19:00 +02:00
Álvaro Velad Galván 7c33192a07 fix(UI): Don't display NaN stats (#6958) 2024-07-01 20:27:33 +02:00
Wojciech Tyczyński 8a678f374d feat(Stats): Add manifestGapCount to stats (#6804)
Resolves #6789
2024-06-13 09:41:57 +02:00
Wojciech Tyczyński 65b0b8dd21 feat(Stats): Add manifestPeriodCount to stats (#6798)
Resolves #6788
2024-06-12 08:37:01 +02:00
Wojciech Tyczyński d0d5843d8c feat(Stats): add size of the manifest to player stats (#6783) 2024-06-10 17:26:44 +02:00
Wojciech Tyczyński 081afde932 feat(Stats): count non fatal errors (#6781)
Add `nonFatalErrorCount` to shaka stats.
2024-06-10 13:46:12 +02:00
Álvaro Velad Galván d532bf44c7 feat: Add bytesDownloaded to stats (#6469)
Closes https://github.com/shaka-project/shaka-player/issues/6413
2024-04-23 14:26:58 -07:00
Julian Domingo 5987458e44 feat: add listenable events for playback stall detection and gap jumping (#4249)
An event `stalldetected` can be dispatched when Shaka Player detects a stall based on the value of stallThreshold through [StreamingConfiguration](https://shaka-player-demo.appspot.com/docs/api/externs_shaka_player.js.html#line920).

A second event `gapjumped` could also be dispatched when Shaka performs a jump in a media gap.

Related to issue #4227
2022-06-02 13:07:17 -07:00
Álvaro Velad Galván 34958c81b9 feat(ui): Added Loop and PIP to context menu, and Statistics to overflow menu (#3578) 2021-10-12 01:00:51 -07:00
Nico afb93106a7 feat(ui): Add right-click context menu, statistics button (#3548)
Closes #2607
2021-08-04 22:16:56 -07:00