Commit Graph

46 Commits

Author SHA1 Message Date
Aditya Mishra 415ebdc52e feat(UI): Add live subtitle style preview on hover (#10077) 2026-05-12 13:24:17 +02:00
Álvaro Velad Galván 514246c8de feat(UI)!: Remove airplay button (#9654)
`airplay` button uses WebKit's proprietary API. In newer versions, this
has been replaced by the RemotePlayback API, which is available in
`remote` button.

More info: https://caniuse.com/mdn-api_remoteplayback

---------

Co-authored-by: Theodore Abshire <TheodoreAbshire@Gmail.com>
2026-02-04 11:28:17 +01:00
Álvaro Velad Galván 3fd73ce941 feat(UI)!: Add bigButtons config and remove addBigPlayButton config (#9636)
- 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
2026-02-02 09:56:43 +01:00
Álvaro Velad Galván 6ba19b2af4 feat(UI): Add subtitle size button (#9530) 2025-12-19 14:09:20 +01:00
Álvaro Velad Galván c6e6082bc2 feat: Allow override subtitle position (#9522)
Close https://github.com/shaka-project/shaka-player/issues/9521

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-12-19 13:38:33 +01:00
Álvaro Velad Galván ff72abc4f5 feat(UI)!: Improve Media Session management (#9483)
Fixes https://github.com/shaka-project/shaka-player/issues/9478
2025-12-10 11:56:03 +01:00
Álvaro Velad Galván ad64dbac6a feat(UI): Add copy video frame button (#9384) 2025-11-12 15:32:41 +01:00
Álvaro Velad Galván 02a2bb54d0 feat(Cast): Support getCurrentAd while casting (#9306) 2025-10-28 13:25:57 +01:00
Álvaro Velad Galván 879f927db3 feat(UI): Support ad events when casting (#9280) 2025-10-24 14:59:11 +02:00
Álvaro Velad Galván 179f7e89ca feat(UI): Allow show the content title (#9206) 2025-10-14 16:08:38 +02: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
Álvaro Velad Galván c0b85c7efb feat(UI): Add video type button (#9107)
This button will appear when the loaded stream has two or more video
roles. E.g.: main and sign.
2025-09-18 13:57:21 +02:00
Phyo Wai Lin d798db5059 feat(UI): Add MaterialSVGIcon element (#8969)
Add a new element for inline SVG icons that is supposed
to be a replacement for the current icon fonts.
I use filled Material Symbols Rounded icons as default.
Intended to support a future transition away from icon fonts.

Related to https://github.com/shaka-project/shaka-player/issues/2467
2025-08-18 12:38:12 +02:00
Álvaro Velad Galván ca8c9bf69c feat(UI): Add skip previous button (#8849) 2025-07-08 06:58:09 +02:00
Álvaro Velad Galván 3daeac65cd feat: Add queue manager (#8649)
Close #8508

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-05-29 12:41:30 +02:00
Álvaro Velad Galván 215b22e131 chore(UI): Remove constants file (#8621) 2025-05-20 15:01:41 +02:00
xiao 724b0b2a71 feat: new TextDisplayer implementation to allow selecting subtitles via native API and controls (#8520)
Close https://github.com/shaka-project/shaka-player/issues/8519
Fixes https://github.com/shaka-project/shaka-player/issues/8475

Introduce `NativeTextDisplayer` as a replacement of
`SimpleTextDisplayer`. But keep them both work.
Is MSE mode, `NativeTextDisplayer` creates `<track>` elements for text
streams. And listens to change events on both ends to keep them in sync.
In SRC mode, `NativeTextDisplayer` would do nothing, the player uses
original TextTracks instead.

Advantages of `NativeTextDisplayer`:
- Allow text track selection using the browser built-in UI
- Allow text track manipulation using native APIs
- Avoid transferring and processing cues in SRC mode

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2025-05-07 12:58:29 +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
Chafroud Tarek 56523e49bf feat: Add Watermark Support to Shaka Player UI (#7877)
This pull request introduces watermark support for the Shaka Player UI.

Added functionality to overlay static or dynamic watermarks on videos.
Included options to customize position, size, color, and opacity.
Enhanced content security with dynamic watermarking capabilities.
Resolves #7726 .
2025-01-14 16:59:34 +01:00
Álvaro Velad Galván 87bf738ece feat(UI): Add chapter button (#7018)
Closes https://github.com/shaka-project/shaka-player/issues/3597
2024-07-11 09:28:31 +02:00
Álvaro Velad Galván 19cfbf966f feat(UI): Add save video frame button (#6926)
Thank you @tykus160 for your Polish translation!
2024-06-27 14:10:18 +02:00
Álvaro Velad Galván ea8202805a feat(UI): Add ad statistics button (#6827) 2024-06-17 10:50:09 +02:00
Álvaro Velad Galván 95c6a7dda3 feat(UI): UI support for VR content (#6450)
Co-authored-by: Joey Parrish <joeyparrish@google.com>
2024-04-25 13:43:32 +02:00
Álvaro Velad Galván 918c30b25a feat(UI): Add double tap to forward/rewind in the video (#5943)
Closes https://github.com/shaka-project/shaka-player/issues/3357
Closes https://github.com/shaka-project/shaka-player/issues/3303

Thanks to @surajkumar-sk, his
https://github.com/shaka-project/shaka-player/pull/3373 has been the
inspiration for this.
2023-11-29 10:22:04 +01:00
Álvaro Velad Galván 1ef5ae0615 feat(UI): Add remote button with RemotePlayback API (#5650)
API: https://developer.mozilla.org/en-US/docs/Web/API/RemotePlayback

Chrome Status: https://chromestatus.com/feature/5778318691401728

Examples: https://avayvod.github.io/remote-playback/test.html and
https://beaufortfrancois.github.io/sandbox/media/remote-playback.html

Tested in Safari (iOS and macOS) and Chrome in Android

About desktop support:
https://bugs.chromium.org/p/chromium/issues/detail?id=728609
2023-09-14 18:17:32 +02:00
Nico afb93106a7 feat(ui): Add right-click context menu, statistics button (#3548)
Closes #2607
2021-08-04 22:16:56 -07:00
code-it.fr f073abc6f5 feat(ui): Allow apps to register a custom seek bar UI implementation (#2966)
* feat(ui): Allow apps to register a custom seek bar UI element implementation

- Make an external interface shaka.extern.IUISeekBar to represent the public methods of shaka.ui.SeekBar, and make SeekBar an implementation of it.
- Add a new function registerSeekBar in shaka.ui.Controls to register a seek bar factory that will be used to create the seek bar in the control elements.

Closes #2924
2020-11-09 15:05:24 -08:00
Álvaro Velad Galván fac29133c2 Add AirPlay button to overflow menu (#2701)
feat(UI): Add AirPlay button to overflow menu.
2020-07-14 15:55:15 -07:00
michellezhuo 562168a1f6 Set UITextDisplayer as TextDisplayFactory in default config
In player, SimpleTextDisplayer was set as the default TextDisplayer. In
our UI, it changes the configuration to use the UITextDisplayer, and
UITextDisplayer gets constructed with the player. Later in our demo, it
resets the config, so an extra SimpleTextDisplayer gets constructed.
This introduces an extra TextTrack created by SimpleTextDisplayer.

This change sets the UITextDisplayer as the default TextDisplayer in
player's default config.

Closes #2516

Change-Id: I3f653be9fad8b2edbc2fb9de84e8abb327dcfc51
2020-05-04 20:40:18 -07:00
michellezhuo cfe1f89171 Add playback speed selection to UI
Closes #2362
Closes #1676

Change-Id: I10184dccab301be7382940e35e36d66dc7a5e2ad
2020-02-12 20:24:03 +00:00
Sandra Lokshina eda5b72134 Add loop control element to the UI.
Please note that this CL doesn't add the new control
to the default layout, so it won't show up in our
demo page.

Issue #2362

Change-Id: Ibecf6a7174de7d8eca9049f0b46ae179a03b9c01
2020-02-04 21:27:20 +00:00
Sandra Lokshina 1b3b78ea16 Add ad position info to the UI. (Ad x of y).
Issue #2222.

Change-Id: I9bf946552bc6f669164c387480fadc100087708a
2019-11-22 22:04:05 +00:00
Sandra Lokshina 7afac89bc2 Restructure AdManager to be owned by Player, not UI.
This will allow Ad functionality to be available for apps
with custom UI.

Change-Id: I3911cb6d764b7aef94166b5f6de3a0a7fa8bb8d9
2019-10-18 18:42:13 +00:00
Sandra Lokshina f485772b6d Add ad elements to the UI layout.
This change adds an ad counter and a skip add
button to the DOM and styles them appropriately.
Please note that they don't work yet!
The elements are hidden for now.
To check them out, remove the 'shaka-hidden'
class from the 'shaka-ad-controls' div.
(data-shaka-player-container -> shaka-ad-controls-container ->
shaka-ad-controls).

Change-Id: I45a33d43abc6b0a023cc77f09abdae94a4cee014
2019-10-11 21:56:44 +00:00
Sandra Lokshina c2105a362b Lay the ground for the Ad Insertion work.
This CL does:
- define CS IMA externs
- define Ad Insertion classes and sctructures
- add a (non-working) skeleton for the Ad UI
- provide a (working) early draft of the CS implementation

This CL does not:
- add any SS logic
- have a working ad UI
- provide a final and complete implementation for the CS logic
- fully follow the finalized Ad Insertion design

Change-Id: I645cdcb3a1d4041792b940c2d6faf011be5eb682
2019-10-03 20:01:38 +00:00
Sandra Lokshina 5646184030 Add a SettingsMenu class for settings menus.
This extracts common code in our overflow menu settings
menus.
Text, Audio Language and Resolution selections now inherit
from this class. It also makes it easier to create new
overflow menu items.

Closes #2091

Change-Id: Ib68e1fb295ed3ec61cb7a072c039a5c7c4e22183
2019-08-20 17:40:47 +00:00
Sandra Lokshina 635acb6ecf Extract the big play button into its own class & make it optional.
Change-Id: I462632c3da5f8ff5a68e111940591086bb395a13
2019-07-25 22:06:37 +00:00
Joey Parrish fcbb72561f Refactor UI range elements
This factors out common functionality and structure from the volume
bar and seek bar, both of which involved specific CSS workarounds for
IE.  The seek bar had logic to keep the value from jumping around
during casting, which now the volume bar benefits from, as well.
Finally, the seek bar code was spread out throughout controls.js, and
now it has its own class.

Closes #1913

Change-Id: I299476ccbc27f28f7b225a6e6f8b0d21abe5baf2
2019-07-10 12:26:54 -07:00
Joey Parrish f39bade337 Add play/pause button in controls
This is different from the giant play/pause button that sits over the
video container.

Change-Id: I4629b3a64a5208f23c65b383f4fb992e6ddfd334
2019-05-07 17:57:59 +00:00
Joey Parrish 00442a9a7c Split up localization data for lazy loading
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
2019-04-09 16:06:14 -07:00
Sandra Lokshina 4d41b7b90c Refactor the overflow menu to use components design.
Closes #1673.

Change-Id: I030745def928796a6abc813a91fb163cb2d76175
2019-02-21 13:14:28 -08:00
Sandra Lokshina 4c1f1985a3 Add fullscreen and fast forward buttons to the compiled build.
Closes #1787.

Change-Id: If8f06c3481a24b39fe99d39feddc581fd225f8f2
2019-02-04 14:35:55 -08:00
Sandra Lokshina 40afb00f20 Add spacer element to the UI.
Issue #1673.

Change-Id: I8e01366f82e5e7d3b9365d8387f02eede877ad07
2019-01-18 21:48:31 +00:00
Sandra Lokshina 121b615c3e Break UI into components design.
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
2019-01-17 21:58:12 +00:00
Michelle Zhuo e89d827717 UI Text Displayer
Adding a custom text displayer at the UI layer to show captions.

Issue #1708

Change-Id: I2aa681459b15d667ab5da7aea195a63e2573c1be
2019-01-17 18:34:32 +00:00
Sandra Lokshina 6b1ca2d229 Initial release of Shaka Player UI
Other contributors:
 - @joeyparrish
 - @michellezhuogg
 - @TheModMaker
 - @theodab
 - @vaage

Change-Id: If6df33d9ab5035d1ead4402004f7de37ee8470f4
2018-11-16 14:40:37 -08:00