- 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
## 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
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.
It seems that the `!` in the header forces the compiler to keep it in
the output. I believe older compiler releases did this purely based
on `@license`.
Issue #2638
Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
When we changed the font for the icons without changing the class
name, we lost upstream styles from the font server. This was not
obvious in our demo, but was more obvious in other apps where the font
size was different.
By using the same class name as used by the font server, we get those
upstream styles applied correctly.
Issue #2633
Change-Id: I615c1dfd86e5b9802d03050c5db0154ac196c2ef
The compiler is very picky about the use of the "disabled" property on
HTMLElement, since it is only defined on certain subclasses of that.
This adds a method to create a button with the correct type to satisfy
the compiler.
Issue #2528
Change-Id: I31cacd62a35acc87b245ab362dbab55d791cf34d
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
This is a fully automated change. The linter will fail because the
extra indentation caused line-length errors. These won't be fixed
automatically. They are fixed in a follow-up to make this one fully
automated.
Change-Id: I4d8cf9c998985add2bcd24a81c8d65495668c4f3
This changes the format of the localization data to enable apps to
trivially lazy-load translations. It also adds --locales to the build
scripts to allow app developers to choose the compiled-in locales.
The generated output now goes into dist/ and is not checked into
revision control. Finally, it adds "description" and "meaning" fields
to the source messages to allow us to more easily integrate with a
context-aware human translation service. The "description" field
provides application context for the translator, while the "meaning"
field provides linguistic disambiguation for words with multiple
meanings or parts of speech in the original English.
Because the translation service wants to collapse messages with
identical text, we had to merge several messages together. To this
end, we have removed the prefixes "ARIA_LABEL_" and "LABEL_" from the
messages themselves and collapsed what remained.
Issue #1688
Change-Id: I24c17e71c73f6663cf123cfdba118c486fa80ecc
What's already done:
- UIElement and IUIElement interface
- All elements register themselves with controls
- Each element is responsible for its' behavior
- A bit of clean up with constants/enums moving to
their own files
What is not done yet:
- Overflow menu is a dumping ground now. Its'
elements will move to the UIElement model eventually, too.
- Build files are hacked a bit and will need more attention.
- No clean up has been done except for the constants/enums.
Change-Id: I9917aa705e85158a2f26830bd988552fe177e53b