Files
shaka-player/externs/fullscreen.js
T
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

37 lines
1.0 KiB
JavaScript

/** @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Externs for fullscreen methods ahead of new compiler release.
* @externs
*
* The old compiler we're using already has an incompatible definition for
* requestFullscreen on Element. Since we can't replace it on Element, we add
* ours on HTMLElement, one subclass down. This is still low-level enough to
* apply to all reasonable usage of the fullscreen API.
*
* The latest compiler version has the updated definition on Element.
*
* TODO: Remove once the compiler is upgraded.
*/
/**
* @record
* @see https://fullscreen.spec.whatwg.org/#dictdef-fullscreenoptions
*/
function FullscreenOptions() {}
/** @type {string} */
FullscreenOptions.prototype.navigationUI;
/**
* @see https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
* @param {!FullscreenOptions=} options
* @return {!Promise}
* @override
* @suppress {checkTypes}
*/
HTMLElement.prototype.requestFullscreen = function(options) {};