mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-15 16:06:41 +03:00
53 lines
1.7 KiB
HTML
53 lines
1.7 KiB
HTML
<!--
|
|
Copyright 2014 Google Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<h3 class="tutorial-heading">
|
|
Polyfills
|
|
</h3>
|
|
|
|
<p>
|
|
A {@link https://remysharp.com/2010/10/08/what-is-a-polyfill polyfill} is a bit
|
|
of code that fills in missing APIs or normalizes variations in APIs. A polyfill
|
|
allows other pieces of code to expect a single API from the underlying browser.
|
|
</p>
|
|
|
|
<p>
|
|
The Shaka Player uses polyfills to modify, rename, or replace various pieces of
|
|
browser functionality. Before instantiating the Player, these polyfills should
|
|
be installed into the JavaScript environment.
|
|
</p>
|
|
|
|
<p>
|
|
Each polyfill has its own class and a static install() method. We suggest that
|
|
you install all polyfills, since the install method will intelligently detect a
|
|
browser's capabilities and only patch APIs which need patching.
|
|
</p>
|
|
|
|
<p>
|
|
Once browsers commonly implement the necessary functionality consistently, some
|
|
polyfills can be removed to reduce the size of the JavaScript code.
|
|
</p>
|
|
|
|
<p>
|
|
For detailed information on our polyfills, please see:
|
|
<ul>
|
|
<li>{@link shaka.polyfill.Fullscreen}</li>
|
|
<li>{@link shaka.polyfill.MediaKeys}</li>
|
|
<li>{@link shaka.polyfill.VideoPlaybackQuality}</li>
|
|
</ul>
|
|
</p>
|
|
|