Commit Graph

13 Commits

Author SHA1 Message Date
Joey Parrish f539147d48 fix: Correct license headers in compiled output
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
2020-06-09 16:05:09 -07:00
Sandra Lokshina 6d66695075 Clear ad break markers on asset unload.
Change-Id: I83dd90015a591183f36ee34fe25c7591e4fadd56
2020-03-02 15:18:59 -08:00
Sandra Lokshina 3a18f1c087 Add ad markers to the seek bar.
Issue #2367.

Change-Id: I6757ac2195b06a205d298082ea7b3d8e3fcc6d8e
2020-03-02 19:44:14 +00:00
Joey Parrish fabf820ac7 Add config to show an unbuffered at seek bar start
If set, this new config field will show any unbuffered region at the
start of the seek bar.  This matches the v2.5 default behavior.  If
unset (the v2.6 default), this will paint any unbuffered region at the
start of the seek bar as simply "played" content (matching Chrome's
native seek bar).

Closes #2424

Change-Id: I528169982ce493b0dbf5a8a1bb46e9e096f422d6
2020-02-25 15:20:30 -08:00
Sandra Lokshina feed333d46 Hide the seek bar when ads are playing.
Change-Id: Ic46d7620f3b8686872926227839416a59055d27f
2020-02-24 17:46:34 +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
Joey Parrish 64896d70b0 Use shorter license header
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
2019-11-22 18:18:36 +00:00
Joey Parrish bc1c3fd012 Make seek & volume bar colors configurable
The seek bar and volume bar are both styled with CSS linear gradients
which are constructed at runtime using the player & video state.  This
makes their styles impossible to tweak in pure CSS.  Before this
change, to maintain the same gradient with different colors, an
application would have to replicate our JS logic.

Now, the application can configure the colors without replicating the
logic used to construct the gradient.

Fixes #2203

Change-Id: I22e62de6c436241e141c76557ebf950cfc8b3ff5
2019-10-22 08:31:01 +00: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 fdd2602acd Release old ui.Elements on controls.configure() calls.
The calls to controls.configure() deleted the old layout
in terms of the html elements, but the ui.Elements
owning the html still survived.
This CL fixes that. It also switches ui.Element from
IDestroyable to IReleasable to make the release synchronous.

Fixes #2089.

Change-Id: Ic4ce70e91a1b028ef4d971ac3fb9281d8a667ea8
2019-08-20 21:09:15 +00:00
Jacob Trimble 8fe79250c1 Fix seek bar coloring when nothing buffered.
You can't use linear-gradient() with one value.  The value will be
silently ignored and we will display the last buffered value.  This
fixes the buffering display to show that nothing is buffered.

This also makes the gradient construction more readable.

Change-Id: I1a93046ef51b70f94b170067b6c5ed2ae43ada1d
2019-08-09 21:18:36 +00:00
Sandra Lokshina 7c271baba5 Communicate seeking state to controls.
Regression from fcbb725. Other elements rely on controls
knowing current seek state. Now that seek bar is its own
class, it needs to update controls on that.

Change-Id: I29ae8faa9f830ef86380d6b07373dedbeebce263
2019-07-22 15:47:51 -07: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