Commit Graph

31 Commits

Author SHA1 Message Date
Álvaro Velad Galván 0542863452 feat(UI): Add chapters marks to seek bar (#9643)
Close https://github.com/shaka-project/shaka-player/issues/9642
2026-02-03 10:33:48 +01:00
Álvaro Velad Galván 872e4655d2 fix(UI): Show always thumb indicator in the seekbar (#9167)
Fixes https://github.com/shaka-project/shaka-player/issues/9165
2025-10-06 12:52:13 +02:00
Phyo Wai Lin e9afbba781 feat(UI): Increase interactive area of seek bar and volume bar (#9124)
- Set `40px` as the touchable size for range elements (seek-bar and
volume-bar).
- Decrease `z-index` of `shaka-seek-bar-container` to `-1` to prevent
seek-bar from covering the controls button panel
- Made `ui-time-container` non-interactive so it can cover the seek-bar
without blocking interactions.

Closes: #9120
2025-09-22 15:43:37 +02:00
Álvaro Velad Galván 6b9569ac9b feat(UI): Add alwaysShowVolumeBar config (#8807) 2025-06-26 15:14:40 +02:00
Álvaro Velad Galván 97ad3ea3f0 fix(UI): Prevent override box-sizing style on range elements (#8810)
Fixes https://github.com/shaka-project/shaka-player/issues/8802
2025-06-26 14:29:56 +02:00
Álvaro Velad Galván 1b2b6b805e fix(UI): Fix volume slider control is not accessible by keyboard (#8809)
Fixes https://github.com/shaka-project/shaka-player/issues/8798
2025-06-26 11:22:25 +02:00
Álvaro Velad Galván f760dbd339 feat(UI): Optimize default UI for small screens (#8436)
Related to
https://github.com/shaka-project/shaka-player/issues/8422#issuecomment-2789964942
2025-04-09 17:58:42 +02:00
Álvaro Velad Galván 1faa11eb7a fix(UI): Only show the volume bar on hover (#8433)
Related to https://github.com/shaka-project/shaka-player/pull/8426
2025-04-09 16:57:01 +02:00
Álvaro Velad Galván 74fda8b658 feat(UI): Hide volume slider when not hovering over the mute button (#8426)
Close https://github.com/shaka-project/shaka-player/issues/8422
2025-04-09 13:05:00 +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
Álvaro Velad Galván 32f8dc5cf4 revert: Add chapter titles and dividers on the seek bar (#6208)
re-open: https://github.com/shaka-project/shaka-player/issues/3597
2024-02-01 08:36:53 +01:00
Álvaro Velad Galván c1198df82f feat(UI): Add chapter titles and dividers on the seek bar (#5863)
Closes https://github.com/shaka-project/shaka-player/issues/3597
2023-11-08 10:20:59 +01:00
Amila Sampath 6c0283e7d0 fix(ui): Widen touchable button area (#3249)
Currently, player buttons clickable area are 24px by 32px which is not close to WCAG guidelines(44px by 44px)

Solution would be moving margins around buttons to paddings since padding rendered as touchable area. This makes player buttons 34*32px. (and makes focus indicators look nicer too :)

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2022-06-02 15:20:28 -07:00
Álvaro Velad Galván 33e84009dc fix(UI): Add cursor pointer to range elements (#4059)
Since range elements are special input elements, they must reflect user
interaction, so when the user hovers over the range element, the cursor must be a pointer.

Issue #3220
2022-03-23 09:56:13 -07:00
Joey Parrish a67cb6ed00 build: Downgrade less (#3982)
Downgrade less to v3.  v4 is failing on macOS for some reason.  See
less/less.js#3693

This also makes some less/CSS changes that are useful for future
upgrades:

 - wrap all calculations in calc(), which is required in less v4
 - remove unneeded @transparent variable

Finally, this fixes an erroneous error message that said "extern
generation failed" instead of "CSS compilation failed".

Closes #3981
2022-02-22 08:46:54 -08:00
Álvaro Velad Galván 463b1b6886 Remove support for IE 11 (#3309)
Issue #2339
2021-04-16 13:59:35 -07:00
Joey Parrish c1b109aabc fix: Correct license headers in CSS/LESS
This corrects/normalizes the license headers in CSS and LESS files.
The LESS tool respects the same "/*!" syntax for forcing the inclusion
of a license header, but will not dedup these licenses.  So the LESS
files generally will not use this syntax.  Instead, the build system
prepends a license header after compilation.

The exception is for our SVG spinner, which is based on third-party
CSS from codepen.  The copyright header for this is forced into the
output to give proper credit to the original author.

Issue #2638

Change-Id: I4c58e2b082f2d5e550a6f0a30feaaf9ebf82a53a
2020-06-09 16:19:38 -07:00
Sandra Lokshina 3a18f1c087 Add ad markers to the seek bar.
Issue #2367.

Change-Id: I6757ac2195b06a205d298082ea7b3d8e3fcc6d8e
2020-03-02 19:44:14 +00:00
Jacob Trimble 326f5cd02a Use short license in more files.
Some of the files still used the old long license.  This increased the
size of the compiled bundle since it had both versions.

Change-Id: Iec137f71547f91369a563145f870eb26ddc96a96
2020-02-11 19:09:44 +00:00
Joey Parrish 4a7aee1daf Customize default UI config for desktop/mobile
To match Chrome native controls, the default controls for desktop will
now contain the small play/pause button, but default controls for
mobile will now contain the large play/pause button.  Mobile controls
will also not contain the volume button.

This removes several CSS-based versions of these things in preference
for configuration.

Apps can still override the defaults, no matter the platform.  Apps
can also make their own mobile-based config choices in JS by checking
video.ui.isMobile() or change styles in CSS using ".shaka-mobile".

Change-Id: I4fb8391f7f3727c7086cd3bca2b1d5c93bd9e856
2020-01-18 23:24:33 +00:00
Joey Parrish 22e8c29a0d Use CSS & container attributes to hide controls
This is now based solely on container attributes and CSS, as it used
to be, removing the need for a list of controls to hide in JavaScript.
This also does away with the "shaka-fade-out-on-mouse-out" CSS class.

Change-Id: Ic2f77c5b2f0691023279d9c99cfe3519f4b26cdd
2020-01-14 10:42:36 -08:00
Sandra Lokshina 26283599a9 Make sure ad UI stays visible when other controls fade out.
This CL changes the way controls fade out on mouseout to make
sure ad controls stay visible even when other controls are not.
Instead of fading everything within the top level controls
container, it's now possible to hide some controls, but
leave the others. Controls that need to fade on mouseout
are tagged with a 'shaka-fade-out-on-mouse-out' class.

To try out the change, make the 'shaka-ad-controls'
div visible and mouse out of the video container.
Everything except for the ad controls should fade.
(Please note that ad controls don't do anything meaningful yet).

Change-Id: I4fcd1b6430df680699980c492ec1d612437a877d
2019-10-14 14:31:40 -07:00
Sandra Lokshina d98aba8eb5 Refactor CSS for the bottom controls (seek bar & panel).
Change-Id: I908afa57b0db4ff462275c675fd257d7a78a2dc3
2019-10-11 18:23:30 +00:00
Theodore Abshire f24c4a783f Added stylelint, a linter for our CSS/less files.
Also unified CSS/less style based on that.
This does have to use a forked version of stylelint, since there
is a bug (?) in the globbing library they use that causes it to
fail on our buildbot. I found the simplest solution was just to add
an option to disable globbing, a feature we weren't using anyway.

Closes #1867

Change-Id: I9295b01d5b15d060356e314938b64b551b75de6a
2019-08-08 18:38:19 +00:00
Joey Parrish e9994730c0 Match positioning with Chrome's native controls
This adjusts the spacing on the UI controls to match that of Chrome's
native controls (as of Chrome 75).

Change-Id: Ie0d0d1c39c3e1b1d5141fa103a8a6bf5b17949d1
2019-07-10 22:31:49 +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 58cedb0367 Add @license to all LESS and CSS files
Change-Id: Ibefe715afcb3676d5a2694032b9c99fe98dd2c44
2019-05-10 17:26:14 +00:00
Joey Parrish 742630f5e0 Overhaul range input elements in the UI
For the volume bar and seek bar, we use an input element of type
"range".

These elements are composed of two main parts: a "track", which is the
horizontal bar, and the "thumb", which is the knob which slides along
that bar.

In order to style the track across browsers (cough, IE 11), we need to
do something a bit tricky.  Styling the track is a nightmare,
especially if you want the thumb to be larger.  On IE 11, this gets
clipped at the track size.  So a tiny track with a large thumb is not
easily achieved.  It can be done, but the techniques for it are
incompatible with the gradient background we want to apply to it.

The solution is to put the input inside a div container, and apply the
background gradient styles to the container.  The container will act
as a visible, virtual track, inside which is contained a larger,
invisible track, in which is contained a visible thumb.  This way, the
thumb is not larger than the actual track (for IE 11's sake), but can
be larger than the virtual track.  And since we are still using a
semantically correct input element, the element is inherently
accessible.

Fixes #1703

Change-Id: I80e1c18d56e0d1455efd26310b699561bf2f41b0
2018-12-10 11:45:41 -08:00
Joey Parrish 2379c4485c Refactor and clean up CSS/Less, and controls JS
- Make shaka-overlay-parent a mixin instead of an actual class
   - Fox maximum stylability, it should be the job of the styles to
     position and overlay objects without JS code declaring that it be
     so.
 - The "seek to live" effect of clicking the current time no longer
   depends on the seek bar being used
 - The shaka-transparent class is not needed.  The controls are now
   set to be opaque based on an attribute.
 - Use an attribute for casting state as well.
 - Remove redundant opacity transition on play button.  It is already
   on the controls overlay as a whole.
 - Make layout more generic, which allows us to remove some explicit
   positioning and browser-specific layout hacks.
 - Rename user-select(), whose value is always the default of "none",
   to unselectable().
 - Remove unnecessary or redundant styles.
 - Apply the same default styles to all control elements, whether
   buttons, divs, or inputs.
 - Make overlay-parent() and overlay-child() more resilient with
   settings to fill space by default.
 - Consolidate the setting of displayed & hidden in JS.

Pre-work for #1703, #1709 (IE style fixes)

Makes progress on b/116651454 (hard-coded offsets)

Change-Id: I7ea579429979afa98f5b2c54f68114312c4f508d
2018-12-07 22:07:13 -08:00
Joey Parrish bab073932a Improve CSS/Less comments
This doesn't start refactoring, but does move a couple of lines around
to group them in clearer ways.  It also adds lots of comments
explaining what things are, what they are for, and where they appear.

Pre-work for #1703, #1709, and b/116651454

Change-Id: I77a76c569e4e426b040eaf55f900baa38414fc0c
2018-12-07 23:27:00 +00:00
Joey Parrish 9f2b4ef617 Split up less/CSS into several files
This doesn't change any styles.  It just splits related styles into
several separate files, so that things are easier to find.

Pre-work for #1703, #1709, and b/116651454

Change-Id: Icd3330a70ca6c8ff313991c127f8036238cae813
2018-12-07 10:09:37 -08:00