Commit Graph

27 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
Joey Parrish df0a5f7290 Fix Safari-prefixed fullscreen APIs
We had made some mistakes in these prefixed names.  The corrections
were made after consulting both MDN and Apple's docs.

This was caught by a compiler upgrade.

Issue #2528

Change-Id: I80994569b04a14b26b3e2fbb2673992ca7e68f50
2020-04-28 20:58:16 +00:00
Joey Parrish 51c3717305 Update fullscreen externs
This updates the fullscreen externs to:
 - Add a newer definition for requestFullscreen which includes options
   for the method
 - Remove prefixed methods which are now built into the compiler and
   are no longer necessary
 - Drop document.webkitSupportsFullscreen method, which does not seem
   to exist as defined, even on iOS (confusion with similar property
   on video element: https://apple.co/39TLC5I)

This enables PR #2325 to resolve issue #2324

Change-Id: Ie7bea7e7d4fd59d6d801431e2ba996649e185dc1
2020-01-06 19:42:18 +00: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
Jacob Trimble 3da809019b Enable additional ES6 linter rules.
Change-Id: I6861541b27153ba034364a5972a9b086de581cef
2019-06-11 18:35:09 +00:00
Theodore Abshire f584c9aab6 Convert remaining polyfills to ES6.
Issue #1157

Change-Id: Ie330cd870ccf14dc3f56987b2787970b46b1ac89
2019-05-29 23:39:08 +00:00
Jacob Trimble c81389741f Prefer const over let.
A coming update to the Google eslint config will require using "const"
over "let".  This makes that one change to isolate the big changes.

Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
2019-05-08 09:22:10 -07:00
Sandra Lokshina 65768a3d41 Hide fullscreen button on platforms that don't support it.
Safari on iOS does not support HTML5 fullscreen API. There
seems to be a (separate) way for a video element to enter
fullscreen mode. I will see if we can adopt it in a different CL.
For now, just hide the button if fullscreen API is not supported.

Issue #1909
Issue b/131923216
Change-Id: Ia30660c7a68fd626051fdf5abce59dbe993b2de2
2019-05-06 22:25:41 +00:00
Joey Parrish fd0449d8f7 Re-enable some disabled style rules
This re-enables the following style rules:
  - "block-spacing"
  - "brace-style"
  - "comma-dangle"
  - "comma-spacing"
  - "new-cap"
  - "no-multi-spaces"
  - "no-multiple-empty-lines"
  - "one-var"
  - "padded-blocks"
  - "prefer-rest-params"

Change-Id: I15d616e8d5b88b273ded6128b4f9ad86bdb26bd1
2018-07-09 19:44:56 +00:00
Jacob Trimble 759eef9685 Change goo.gl links to bit.ly.
https://goo.gl is being turned-down, so we can't use it for new URLS.
So we have consistent short links, this converts them to be
https://bit.ly.

Change-Id: I07a86cba807b67157664893341f648023918d0de
2018-06-22 20:20:00 +00:00
Jacob Trimble b512db87dd Convert 'var' to 'let'/'const' (8 of 9).
This is part of a change to convert all usages of 'var' with either
'let' or 'const'.  This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.

Change-Id: I6a329d28e13a81c9f7136737518c6bb8fa18402e
2018-02-20 11:29:30 -08:00
Ross-cz 3831664a22 Fix fullscreen polyfill for MSIE 11 (#777) 2017-05-05 15:35:27 -07:00
Theodore Abshire 8ab9188bdb Expanded the fullscreen polyfill.
Now it includes fullscreenEnabled.

Closes #669

Change-Id: I7df3c422ecc72215a48ba72ac57aae2bc9b600d5
2017-02-10 22:05:31 +00:00
Joey Parrish 894c56d3c9 Remove suppression of "unnecessaryCasts"
This no longer seems to be needed.

Change-Id: I8f9ed03f97b235d4652930745d4416f6c8f77445
2016-11-04 19:40:55 +00:00
Jacob Trimble 19973d63f4 Changed copyright headers from 2015 to 2016.
Change-Id: I429ff27e4794c03b7ea392e38415075077f9bfb1
2016-03-15 16:32:13 -07:00
Joey Parrish 09bb56164a Do not export individual polyfill docs
Also corrects duplicate Promise entry.

Change-Id: I7d675b0e8bbcbcb1dc1508f3c08e0a3811149d63
2016-03-01 17:51:14 +00:00
Jacob Trimble 47a99253b0 Polyfills now register as plugins.
Change-Id: I498bda84d92f2c733f120e1b1c5a0ccae305ba15
2016-02-02 12:11:49 -08:00
Joey Parrish 1d1a0fcb46 Enable all compiler errors
This also cleans up compiler errors for:
  - Things required but not used
  - Things used but not required
  - Write-only local variables

We are suppressing the 'unnecessaryCasts' error in specific places
where it is, in fact, necessary to convert between unrelated types
for polyfills and work-alikes.

Change-Id: I155c746116f95383ea0a9caf9239fadccd8601af
2015-12-11 13:30:44 -08:00
Joey Parrish 3e7014db2b Fix library load and polyfill for old browsers
This will allow support-testing to work on older browsers so that
application developers can still load the library and query for
support to show an appropriate error message.

To accomplish this, we avoid load-time uses of Function.bind, avoid
certain polyfills if modern types are not available, and compile down
to ES3 to avoid errors caused by use of the reserved word "catch" on
Promises.

This has been tested back to IE6, Safari 5.1, iOS 6.0, Firefox 6,
Chrome 15, and Opera 16.

Change-Id: I9deed106a7736758e04452ef85bae40f37c6fe62
2015-12-10 10:49:45 -08:00
Joey Parrish fff5dd7ee7 Audit exports
This changes namespace exports to the more targetted exportDoc,
adds exports where they are needed and removes them where they are
not.  Exporting of Uint8Array and String utils should be re-evaluated
later.

Change-Id: I9298e73a0a5ef026b6f2b1854488d2c359be10c1
2015-12-01 13:56:37 -08:00
Joey Parrish 4cc4e96dbd Overhaul license comments and file annotations
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
  compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.

This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.

Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
2015-09-08 12:02:34 -07:00
Joey Parrish 4d9177240a Revert "Adding license annotation to js files."
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.

The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.

We can re-examine this once we have restructured the license headers.

Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
2015-09-04 18:36:39 -07:00
Yohann Connell 8cb24652cb Adding license annotation to js files.
Change-Id: Id10592ccaf35608ac4f01844cae2fec4a2030d65
2015-09-04 00:05:17 +00:00
Joey Parrish 7ea820c399 Fix fullscreen polyfill test.
Only install a getter for fullscreenElement if the property does not
exist.  Previously, we installed the getter if the property existed
but was null.

Change-Id: Ibea5bc63a75a98cd1d50c56ca99fac2aa38e449b
2015-04-21 10:54:34 -07:00
Joey Parrish 7989aadadc Add fullscreen events to the polyfill.
Change-Id: I13b6a44630aa87ac06c1f5d6271a5ba1e32c3746
2015-03-09 19:10:14 +00:00
Joey Parrish 8a532c0c7e Update/expand fullscreen polyfill.
Change-Id: I2ecbddbdc2ced03ee489dfc37488e7046c488eb9
2015-02-23 17:46:54 -08:00
Joey Parrish b3d035be9f Shaka Player release v1.0 2014-12-19 14:26:19 -08:00