mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
e7b1e5a0f6
## 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>
32 lines
726 B
JavaScript
32 lines
726 B
JavaScript
/*! @license
|
|
* Shaka Player
|
|
* Copyright 2016 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
goog.provide('shaka.ui.HiddenRewindButton');
|
|
|
|
goog.require('shaka.ui.Enums');
|
|
goog.require('shaka.ui.HiddenSeekButton');
|
|
|
|
goog.requireType('shaka.ui.Controls');
|
|
|
|
/**
|
|
* @extends {shaka.ui.HiddenSeekButton}
|
|
* @final
|
|
* @export
|
|
*/
|
|
shaka.ui.HiddenRewindButton = class extends shaka.ui.HiddenSeekButton {
|
|
/**
|
|
* @param {!HTMLElement} parent
|
|
* @param {!shaka.ui.Controls} controls
|
|
*/
|
|
constructor(parent, controls) {
|
|
super(parent, controls);
|
|
|
|
this.seekContainer.classList.add('shaka-rewind-container');
|
|
this.seekIcon.use(shaka.ui.Enums.MaterialDesignSVGIcons['REWIND']);
|
|
this.isRewind = true;
|
|
}
|
|
};
|