The changes in this PR add support for non-square pixels, e.g. SAR value
of 2:1 (or any other) to the Resolution Selection Menu.
Currently, some contents can be falsely detected as portrait video by
getResolutionLabel_, e.g. a 960x1080p content with a SAR value of 2:1
would be detected as portrait and have its width and height swapped by
getResolutionLabel_. However it is a landscape content: the horizontal
pixels would be stretched to display a horizontal video.
This PR adds `isLCEVC` check to the `basicResolutionComparison` and
appends `'LCEVC'` to the label text in `getResolutionLabel_` if the
track is LCEVC. This makes it easier to tell LCEVC profiles apart and
fixes an issue we were seeing when many different Dual-Track profiles
are contained in the manifest, it might be hard to differentiate them
(e.g. base and LCEVC profile with the same 1080p resolution).
## 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>
* 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
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
We recently added the ability for the UI to display multiple variants of
the same resolution, if they had different video bandwidths.
This changes the UI to also list the video bandwidth in the menu itself,
in that case.
Closes#6494