diff --git a/Gruntfile.js b/Gruntfile.js index 44fb374a..afb191cd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,6 +4,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks("grunt-contrib-cssmin"); grunt.loadNpmTasks("grunt-contrib-clean"); grunt.loadNpmTasks("grunt-remove-logging"); + grunt.loadNpmTasks("grunt-decomment"); grunt.loadNpmTasks("grunt-contrib-jshint"); grunt.loadNpmTasks("grunt-terser"); @@ -102,6 +103,17 @@ module.exports = function (grunt) { // Remove all console output (see https://www.npmjs.com/package/grunt-remove-logging) }, }, + decomment: { + any: { + options: { + safe: true, + }, + files: { + "build/<%= pkg.name %>.dist.js": "build/<%= pkg.name %>.dist.js", + }, + + } + }, terser: { min: { files: { @@ -160,6 +172,7 @@ module.exports = function (grunt) { grunt.registerTask("default", [ "concat:build", "removelogging:dist", + "decomment", "terser:min", "cssmin", ]); diff --git a/README.md b/README.md index 793e8708..1fa5608b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![AblePlayer in action, showing the video player with captions, synchronized sign language, and a navigable transcript](https://user-images.githubusercontent.com/55474996/227562765-7a17103c-4c93-4a17-82b4-fc1e401972b0.png) -*Able Player* is a fully accessible cross-browser HTML5 media player. +*Able Player* is a fully accessible cross-browser HTML5 media player. - [Feature List](#feature-list) - [Supported Languages](#supported-languages) @@ -25,9 +25,9 @@ - Features high contrast, scalable controls that remain visible in Windows High Contrast mode, plus an easy-to-see focus indicator so keyboard users can easily tell which control currently has focus. - Supports closed captions and subtitles in Web Video Timed Text (WebVTT) format, the standard format recommended by the HTML5 specification. - Supports chapters, also using WebVTT. Chapters are specific landing points in the video, allowing video content to have structure and be more easily navigated. -- Supports text-based audio description, also using WebVTT. At designated times, the description text is read aloud by browsers, or by screen readers for browsers that don't support the Web Speech API. Users can optionally set their player to pause when audio description starts in order to avoid conflicts between the description and program audio. +- Supports text-based audio description, also using WebVTT. At designated times, the description text is read aloud by browsers, or by screen readers for browsers that don't support the Web Speech API. Users can optionally set their player to pause when audio description starts to avoid conflicts between the description and program audio. - Supports audio description as a separate video. When two videos are available (one with description and one without), both can be delivered together using the same player and users can toggle between the versions. -- Supports adjustable playback rate. Users who need to slow down the video in order to better process and understand its content can do so; and users who need to speed up the video in order to maintain better focus can do so. +- Supports adjustable playback rate. Users who need to slow down the video to better process and understand its content can do so; and users who need to speed up the video to maintain better focus can do so. - Includes an interactive transcript feature, built from the WebVTT chapter, caption and description files as the page is loaded. Users can click anywhere in the transcript to start playing the video (or audio) at that point. Keyboard users can also choose to keyboard-enable the transcript, so they can tab through its content one caption at a time and press enter to play the media at the desired point. - Features automatic text highlighting within the transcript as the media plays. This feature is enabled by default but can be turned off if users find it distracting. - Supports YouTube and Vimeo videos. @@ -43,22 +43,22 @@ Able Player has been translated into the following languages.
  • Bahasa Indonesia (Indonesian)
  • Català (Catalan)
  • čeština (Czech)
  • -
  • Chinese, Traditional (Taiwan)
  • -
  • Dansk (Danish)
  • +
  • Chinese, Traditional (Taiwan)
  • +
  • Dansk (Danish)
  • Deutsch (German)
  • -
  • English
  • -
  • Español (Spanish)
  • -
  • Français (French)
  • +
  • English
  • +
  • Español (Spanish)
  • +
  • Français (French)
  • עִברִית (Hebrew)
  • Indonesian
  • Italiano (Italian)
  • -
  • 日本語 (Japanese)
  • +
  • 日本語 (Japanese)
  • Melayu (Malay)
  • -
  • Português (Portuguese)
  • -
  • Português - Brasil (Portuguese - Brazil)
  • -
  • Norsk Bokmål (Norwegian)
  • -
  • Nederlands, Vlaams (Dutch)
  • -
  • Svenska (Swedish)
  • +
  • Português (Portuguese)
  • +
  • Português - Brasil (Portuguese - Brazil)
  • +
  • Norsk Bokmål (Norwegian)
  • +
  • Nederlands, Vlaams (Dutch)
  • +
  • Svenska (Swedish)
  • Türkçe (Turkish)
  • @@ -66,60 +66,58 @@ Able Player has been translated into the following languages. During development, *Able Player* is routinely tested with the latest versions of the following browsers. -### Windows +### Windows - Chrome -- Firefox +- Firefox - Edge -### Mac OS -- Chrome -- Firefox -- Safari -- Opera +### Mac OS +- Chrome +- Firefox +- Safari +- Opera ### iOS (iPhone and iPad) -- Safari +- Safari ### Android (Google Pixel) -- Chrome -- Firefox +- Chrome +- Firefox -With the release of version 4.4, we are no longer actively supporting Internet Explorer. +Since the release of version 4.4, we are no longer supporting Internet Explorer. ## Dependencies -*Able Player* has the following third party dependencies: +*Able Player* has the following third party dependencies: - *Able Player* uses [jQuery][]. Version 3.5.0 or higher is recommended. The example code below uses Google’s hosted libraries; no download required. - *Able Player* uses [js-cookie][] to store and retrieve user - preferences in cookies. The example code below uses CDN’s hosted libraries; - no download required. Prior to version 2.3, Able Player used [jquery.cookie][] - for this same purpose. -- *AblePlayer*, as of 4.5.1, requires the use of the DOMPurify sanitizing library. - - The default files in the root of the `/build` directory have DOMPurify bundled in. + preferences in cookies. The example code below uses CDN’s hosted libraries; + no download required. All Able Player cookies are functional cookies. +- *AblePlayer*, as of 4.5.1, requires the use of the DOMPurify sanitizing library. + - The default files in the root of the `/build` directory have DOMPurify bundled in. - Alternatively, the `build/separate-dompurify` directory houses copies of the AblePlayer files with AblePlayer code only and a stand-alone copy of the current version of DOMPurify that the project is currently using. These files are available for those who want to load DOMPurify via a separate file or want to use a CDN hosted version. - + To install Able Player, copy the following files from the Able Player repo into a folder on your web server: -- `build/*` -- `button-icons/*` -- `images/*` +- `build/*` +- `button-icons/*` (optional, not required for svg) - `styles/*` (optional, see note below) - `translations/*` -- `LICENSE` +- `LICENSE` -The *build* folder includes minified production code (*ableplayer.min.js* and *ableplayer.min.css*). -For debugging and/or style customization purposes, human-readable source files are also available: +The *build* folder includes minified production code (*ableplayer.min.js* and *ableplayer.min.css*). +For debugging and/or style customization purposes, human-readable source files are also available: - `build/ableplayer.js` - `styles/ableplayer.css` - + ## Fallback -All modern browsers have supported HTML5 media elements for many years. For older browsers, alternative content can be provided. We recommend providing alternative content as a child of the `