Giter Site home page Giter Site logo

ableplayer's Introduction

Able Player

Able Player is a fully accessible cross-browser HTML5 media player.

To see the player in action check out the Able Player Examples page.

Features

  • Supports both audio and video.
  • Supports either a single audio track or an entire playlist.
  • Includes a full set of player controls that are keyboard-accessible, properly labeled for screen reader users, and controllable by speech recognition users.
  • Includes customizable keyboard shortcuts that enable the player to be operated from anywhere on the web page (unless there are multiple instances of the player on a given page; then the player must have focus for keyboard shortcuts to work).
  • 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 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.
  • 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.
  • Provides users with the ability to customize the display of captions and subtitles. Users can control the font style, size, and color of caption text; plus background color and transparency; all from the Preferences dialog. They can also choose to position captions below the video instead of the default position (an semi-transparent overlay).
  • Supports fallback content if the media cannot be played (see section on Fallback for details).
  • Includes extensive customization options. Many of the features described above are controlled by user preferences. This is based on the belief that every user has different needs and there are no one-size-fits-all solutions. This is the heart of universal design.

Supported Languages

Able Player has been translated into the following languages. To add another language, see instructions below under Contributing.

  • Bahasa Indonesia (Indonesian)
  • Català (Catalan)
  • čeština (Czech)
  • Chinese, Traditional (Taiwan)
  • Dansk (Danish)
  • Deutsch (German)
  • English
  • Español (Spanish)
  • Français (French)
  • עִברִית (Hebrew)
  • Indonesian
  • Italiano (Italian)
  • 日本語 (Japanese)
  • Português (Portuguese)
  • Português - Brasil (Portuguese - Brazil)
  • Norsk Bokmål (Norwegian)
  • Nederlands, Vlaams (Dutch)
  • Svenska (Swedish)
  • Türkçe (Turkish)

Contributing

There are many ways to contribute to Able Player, and we welcome and appreciate your help! Here are some options:

  • If you spot bugs are have feature requests, please submit them to the Issues queue.
  • If you have code to contribute, please note that all development occurs on the develop branch. This is often many commits ahead of the main branch, so please do all development from develop, and submit pull requests there. We particularly appreciate help with any issues in the Issues queue that have been flagged with "help wanted".
  • If you are multilingual, please consider translating Able Player into another language! All labels, prompts, messages, and help text for each language are contained within a single file, contained within the /translations directory.

Compatibility

During development, Able Player is routinely tested with the latest versions of the following browsers.

Windows

  • Chrome
  • Firefox
  • Edge

Mac OS

  • Chrome
  • Firefox
  • Safari
  • Opera

iOS (iPhone and iPad)

  • Safari

Android (Google Pixel)

  • Chrome
  • Firefox

With the release of version 4.4, we are no longer actively supporting Internet Explorer.

Dependencies

Able Player has the following third party dependencies:

  • Able Player uses jQuery. Version 3.2.1 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.

To install Able Player, copy the following files from the Able Player repo into a folder on your web server:

  •   build/* 
    
  •   button-icons/*
    
  •   images/*
    
  •   styles/* (optional, see note below)
    
  •   translations/* 
    
  •   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:

  •   build/ableplayer.js 
    
  •   styles/ableplayer.css 
    

Fallback

All modern browsers have supported HTML5 media elements for many years. However, there are still older browsers in use that don’t have this support (e.g., Internet Explorer 9 and earlier). For these, fallback content should be provided.

Prior to version 4.0, Able Player used JW Player as a fallback Flash player for older browsers. However, this solution was built specifically on JW Player 6 which is now many versions old and difficult to find.

Also, prior to version 4.0, Able Player used Modernizr to enable styling of HTML5 elements in Internet Explorer 6 through 8. This too is no longer supported, and Modernizr is no longer needed.

Instead, we recommend providing alternative content as a child of the <video> or <audio> element. For example, this could be a link to the media file so users can download it and play it on their player of choice. Or it could be a link to a transcript.

If Able Player fails to load, it will fall back to the HTML media element and if the browser supports HTML5 media, the browser will provide its own interface for playing the media. If the browser is unable to play the media file, it will display the alternative content. If no alternative content is provided, Able Player will inject a short error message for the browser to display.

Fallback content can be tested by adding the data-test-fallback attribute to the <audio> or <video> element, with a value of either "1" (emulate failure to build Able Player) or "2" (emulate a browser that doesn't support HTML5 media).

Setup Step 1: Use HTML5 Doctype

Able Player is built on the HTML5 media elements, so at the top of your web page be sure you have the HTML5 doctype:

<!DOCTYPE html>

Setup Step 2: Add JavaScript and CSS

Copy and paste the following code into your web page. This code applies to all use cases, both audio and video.

<!-- Dependencies -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js"></script>

<!-- CSS -->
<link rel="stylesheet" href="build/ableplayer.min.css" type="text/css"/>

<!-- JavaScript -->
<script src="build/ableplayer.min.js"></script>

Setup Step 3: Add HTML

Add an HTML5 <audio> or <video> element to your web page, as follows.

Audio

Copy and paste the following code into your web page, replacing the source files with the path to your own media files. Use both OGG and MP3 to ensure cross-browser compatibility, since some browsers don’t support MP3.

<audio id="audio1" data-able-player preload="auto">
  <source type="audio/ogg" src="path_to_audio_file.ogg"/>
  <source type="audio/mpeg" src="path_to_audio_file.mp3"/>
</audio>

Video

Copy and paste the following code into your web page, replacing the source files with the path to your own media files. Use both WebM and MP4 to ensure cross-browser compatibility, since some browsers don’t support MP4.

<video id="video1" data-able-player preload="auto" width="480" height="360" poster="path_to_image.jpg">
  <source type="video/webm" src="path_to_video.webm" data-desc-src="path_to_described_video.webm"/>
  <source type="video/mp4" src="path_to_video.mp4" data-desc-src="path_to_described_video.mp4"/>
  <track kind="captions" src="path_to_captions.vtt"/>
  <track kind="descriptions" src="path_to_descriptions.vtt"/>
</video>

Supported Attributes

The following attributes are supported on both the <audio> and <video> elements:

Required Attributes

  • id - required; any unique ID
  • data-able-player - required

Optional; General-Purpose

  • data-debug - optional; if present will write messages to the developer console
  • autoplay - optional; play media automatically when page loads. For accessibility reasons, this is not recommended unless user is sure to expect media to automatically start. For example, autoplay could reasonably be used in conjunction with data-start-time in a media search application.
  • loop - optional; loops and plays the media file repeatedly. If used in conjunction with a playlist, loops the entire playlist rather than individual tracks.
  • playsinline - optional but recommended; instructs supporting browsers to play the video "inline" within the web page. This is especially applicable on iPhones, which by default load the video in their own built-in video player, thereby removing it from its surrounding context, which includes Able Player buttons and controls, an interactive transcript, and any other companion features added via Able Player. If this attribute is present, it works for all supported videos, including YouTube and Vimeo videos.
  • preload - optional; tells the browser how much media to download when the page loads. If the media is the central focus of the web page, use preload="auto", which instructs the browser to download as much of the media as possible. If the media is not a central focus, downloading the entire media resource can consume valuable bandwidth, so preload="metadata" would be a better option.
  • width - width of the video player in pixels. This value should reflect the target width of the media itself. If not provided the player will be sized to fit its container. This value is supported for audio as well, but this is not valid HTML so data-width should be used instead.
  • data-width - width of the media player in pixels (can be used for either audio or video). If neither width nor data-width are provided, the player will be sized to fit its container.
  • data-root-path - define path to root directory of Able Player; generally not required but may be needed in rare instances where Able Player is unable to identify its current path on the web server
  • data-heading-level - optional; Able Player injects an off-screen HTML heading "Media Player" (or localized equivalent) at the top of the player so screen reader users can easily find the player. It automatically assigns a heading level that is one level deeper than the closest parent heading. This attribute can be used to manually set the heading level, rather than relying on Able Player to assign it automatically. Valid values are 1 through 6. A value of 0 is also supported, and instructs Able Player to not inject a heading at all. The latter should be used only if the web page already includes a heading immediately prior to the media player.
  • data-hide-controls - optional; set to "true" to hide controls during playback. Controls are visibly hidden but still accessible to assistive technologies. Controls reappear if user presses any key or moves the mouse over the video player region.
  • data-icon-type - optional; "svg", "font" or "image"; "svg" is the default with automatic fallback to "font" unless either (a) the browser doesn't support icon fonts or (b) the user has a custom style sheet that may impact the display of icon fonts; in either case falls back to images. Should generally leave as is unless testing the fallback.
  • data-skin - optional; "legacy (default) or "2020". The default skin has two rows of controls, with the seekbar positioned in available space within the top row. The "2020" skin, introduced in version 4.2, has all buttons in one row beneath a full-width seekbar.
  • data-speed-icons - optional; "animals" (default) or "arrows". The default setting uses a turtle icon for slower and a rabbit icon for faster. Setting this to "arrows" uses the original Able Player icons (prior to version 3.5), arrows pointing up for faster and down for slower.
  • data-start-time - optional; time at which you want the audio to start playing (in seconds)
  • data-steno-iframe-id - optional; id of an iframe in which users will be typing with steno-mode enabled (see next item).
  • data-steno-mode - optional; "true" to allow keyboard shortcuts for controlling the player remotely within textarea form fields, e.g., for transcribing media content.
  • data-volume - optional; set the default volume (0 to 10; default is 7 to avoid overpowering screen reader audio)
  • data-seek-interval - optional; interval (in seconds) of forward and rewind buttons. By default, seek interval is intelligently calculated based on duration of the media.
  • data-show-now-playing - optional; "true" to include "Selected track" section within player; only applies when a playlist is present

Language

  • data-lang - optional; specify language of the player using 2-character language code. In order to work, the language specified must be one of Able Player's supported languages (see Supported Languages above). If data-lang is not included or specifies a language that is not supported, Able Player will default to the language of the web page if known and supported; otherwise it will default to English.

Captions

  • data-captions-position - optional; specify default position of captions relative to the video (either "below" or "overlay"; "below" is the default if not specified). Users can override this setting in Captions Preferences.
  • data-state-captions - optional; "on" or "off". Captions are on by default if they're available, but this allows website owners to override that setting. If users enable captions, their preference will be saved in a cookie, and that will override the default setting on future visits.

Transcript

Able Player can automatically generate an accessible interactive transcript from the chapters, captions, and descriptions tracks. There are three types of interactive transcripts supported:

  • "external" - Automatically generated, written to an external div (requires data-transcript-div)
  • "popup" - Automatically generated, written to a draggable, resizable popup window that can be toggled on/off with a button on the controller
  • "manual" - A manually coded external transcript (requires data-transcript-src)

The following attributes control which of the above types, if any, are generated:

  • data-transcript-div - optional; id of an external div in which to display an interactive transcript.
  • data-transcript-src - optional; id of an external div that contains a pre-existing manually coded transcript. Able Player will parse this transcript and interact with it during playback.
  • data-include-transcript - optional; set to "false" to exclude transcript button from controller.

If none of the above attributes are present, the transcript will be displayed in a draggable, resizable popup that can be toggled on/off using a button on the controller. Note that a toggle button is added to the controller only if the transcript is a "popup" type; there is no toggle button for either the "external" or "manual" transcript types.

Additional transcript-related attributes include:

  • data-transcript-title - optional; override default transcript title (default is "Transcript", or "Lyrics" if the data-lyrics-mode attribute is present)
  • data-lyrics-mode - optional; forces a line break between and within captions in the transcript

To manually code the transcript, one simple strategy is to first allow Able Player to automatically generate a transcript. Then copy and paste its content as a starting point. To manually code a transcript from scratch, use the following markup (see Video Demo #7 for an example):

  • Wrap the entire transcript in a container with class="able-transcript", and wrap that in another container with class="able-transcript-area".
  • Add an empty <div> just inside the outer container with class="able-window-toolbar".
  • Wrap all audio description in a <div> element with class="able-transcript-desc".
  • Add a <span> element to the start of each audio description block, with class="able-hidden" and text "Description:". This helps screen reader users to distinguish between caption and description text.
  • Wrap each block of caption text in a <div> element with class="able-transcript-block".
  • Wrap each clickable segment of content in a <span> element, with class="able-transcript-seekpoint", plus data-start and data-end attributes. The values of these two data attributes are the video start and end times expressed in seconds (decimals points are allowed).
  • If the clickable span is caption text, also add the "able-transcript-caption" class.
  • Wrap unspoken content such as names of speakers or descriptions of sound in a <span> element with class="able-unspoken".
  • Use any other markup desired to add structure and style to your transcript. Able Player will ignore it.

Chapters

  • data-chapters-div - optional; id of an external div in which to display a list of chapters. The list of chapters is generated automatically if a chapters track is available in a WebVTT file. If this attribute is not provided and chapter are available, chapters will be displayed in a popup menu triggered by the Chapters button.
  • data-use-chapters-button - optional; set to "false" to exclude chapters button from controller. If using the data-chapters-div attribute to write the chapters to an external container, you might not want users to be able to toggle the chapters off.
  • data-chapters-title - optional; override default chapters title (default is "Chapters"). A null value (data-chapters-title="") eliminates the title altogether.
  • data-chapters-default - optional; identify ID of default chapter (must correspond with the text or value immediately above the timestamp in your chapter's WebVTT file). If this attribute is present, the media will be advanced to this start time. Otherwise it will start at the beginning. (See also data-start-time).
  • data-seekbar-scope - optional; default is "video" (seekbar represents full duration of video); if set to "chapter" seekbar represents the duration of the current chapter only

Metadata

Metadata is added using the <track> element with kind="metadata". It must be in Web Video Text Tracks format (WebVTT). Able Player supports two types of metadata:

  1. "text" - The WebVTT file contains text, intended to be written to an external container at the designated times. You must provide the external container; Able Player does not generate that automatically.

  2. "selector" - The WebVTT file contains jQuery selectors which target hidden content that is already present on the web page. At the designated times, the hidden content referenced by the jQuery selectors is made visible. In addition to selectors, the WebVTT file can contain either of the following keywords, each on a line by itself:

  • PAUSE instructs Able Player to pause the video at that point.
  • FOCUS: followed by a jQuery selector, places keyboard focus on the designated element, which should have a tabindex attribute with a value of either "0" (element is part of the regular tab order) or "-1" (element is not part of the regular tab order, but can receive focus in this context via JavasScript).

This combination of exposing new content, pausing the video, and placing keyboard focus on a newly exposed element, can be used to provide supplemental content including clickable "hot spots" overlaid on the video.

The following attributes make all this possible:

  • data-meta-type - required for metadata; indicates the type of metadata contained within a metadata track. Supported values as described above are "text" and "selector".
  • data-meta-div - required for "text" metadata; id of an external div in which to display the text.
  • data-duration - optional attribute on the element displayed via a metadata track; value is the number of milliseconds to display the element before it fades out. Elements displayed via metadata tracks automatically fade out at the end time designated within the WebVTT file. However, if the data-duration attribute is present, this enables an element to fade out before the designated time. This is useful if multiple elements appear simultaneously, but some need to fade out earlier than others.

NOTE: If you're using metadata to expose content in sync with videos hosted on YouTube, please review YouTube's Terms of Service related to Overlays and Frames. As of August 11, 2016: "You must not display overlays, frames, or other visual elements in front of any part of a YouTube embedded player, including player controls. Similarly, you must not use overlays, frames or other visual elements to obscure any part of an embedded player, including player controls."

Search

  • data-search-div - required for search; id of external container in which to display search results
  • data-search - optional; search terms to search for within the caption tracks, separated by a space
  • data-search-lang - optional; specify 2-character language code of caption or subtitle track to search. If unspecified, searches the default language, which is the language of the web page if specified using the lang attribute on either the <html> or <body> tag.
  • data-search-ignore-caps - optional; ignore capitalization in search terms. If omitted, search is case-sensitive.

Fallback Player

  • data-test-fallback - optional (for testing); force browsers to display fallback content. Set to either of the following values:
    • "1" - emulate failure to build Able Player
      • "2" - emulate browser that doesn't support HTML5 media

The following attributes are supported on the <video> element only:

  • data-allow-fullscreen - optional; if set to "false" the player will not include a fullscreen button
  • data-youtube-id - optional; 11-character YouTube ID, to play the YouTube video using Able Player.
  • data-youtube-desc-id - optional; 11-character YouTube ID of the described version of a video. See the section below on YouTube Support for additional information.
  • data-youtube-nocookie - optional; if set to "true" the YouTube video will be embedded using the "youtube-nocookie.com" host.
  • data-vimeo-id - optional; ID of a video on Vimeo, to play the Vimeo video using Able Player.
  • data-vimeo-desc-id - optional; ID of the described version of a video on Vimeo. See the section below on Vimeo Support for additional information.
  • height - height of the video in pixels.
  • poster - path to an image file. Will be displayed in the player until the video is played.

If width and height are omitted, the player will be sized to fit its container.

The following additional features are supported by Able Player:

Multiple source files

As with audio, we recommend including two versions of each video, one in H.264 (MP4) and another in WebM or OGG for browsers that don’t support MP4. Browsers will play the first media source that they support.

Closed Captions

Captions are added using the <track> element with kind="captions". Captions must be in Web Video Text Tracks format (WebVTT). WebVTT tags within captions are currently ignored.

NOTE: Able Player only supports valid WebVTT files. Be sure to validate your WebVTT using a WebVTT Validator.

If captions are provided, a CC button will be added to the Able Player controller.

Audio Description

Supplemental description of key visual content for blind users can be added using one of two methods.

The first method is the same as closed captions, a <track> element, with kind="descriptions". This points to a WebVTT file, which is essentially the same as a closed caption file, but its contents are description text rather than captions. With this method, description text is read aloud by browsers that support the Web Speech API; otherwise it's written to an
ARIA live region, so supporting screen readers will automatically announce the new text as soon as it is written to the page. There are many advantages to having browsers perform this function: It frees screen readers to perform other tasks without disrupting audio description; it makes it possible to pause during audio description then automatically resume playback when description is complete; and it allows users to customize the voice, pitch, rate and volume that are used for reading description (via the Description Prefences dialog). However, in rare instances it might be preferable to have screen readers perform this function rather than browsers (e.g., if a language is not well supported by the Web Speech API). In such instances, use data-desc-reader="screenreader" (otherwise this property will default to "browser").

The second method is to produce a separate video with description mixed in. If multiple video sources are already provided (e.g., an MP4 and WebM file), then the described version must be available in both of these formats. For each video source that has a described version available, add a data-desc-src attribute to the <source> element for that video. The value of this attribute is a path pointing to the described version of the video. With this method, the described version of the video can be played instead of the non-described version, and the two versions can be swapped with clicking the "Descriptions" button on the controller.

If descriptions are available using either of the above methods, a Description toggle button appears on the controller (represented by the universal Description symbol, the letter "D"). How descriptions are ultimately delivered depends on which of the above methods is used.

If both methods are used, description will be delivered using the separate
described version of the video. However, the WebVTT file will be used to (a) display the description text visibly (if users have selected this option in their preferences), and (b) incorporate the description text into the auto-generated interactive transcript. Therefore, it is important for the WebVTT description file to be accurately synchronized with the separate described version of the video.

In some applications, a WebVTT descriptions file might be used solely for the purposes of displaying visible description text or incorporating description text into the auto-generated transcript, and the WebVTT description text is not intended to be read aloud by screen readers or browsers (for example, if the sole video source is a described video). In such cases, use data-descriptions-audible="false" to prevent browsers and screen readers from announcing the description text.

If description is available through either of the above methods, it is off by default and users must enable it using the "Descriptions" button on the player control. Website owners can override
this setting and change the default state to "on" using data-state-descriptions="on". Also, website owners can define the default state of extended descriptions (i.e., pausing the video during audio description) using data-desc-pause-default. Supported values are either "off" or "on". Setting this to "off" is useful if all videos have plenty of audio space for description to be read, and pausing is therefore unnecessary. The default setting is "on". If users have changed this setting in the Description Preferences dialog, their preference will be saved in a cookie, and that will override the default setting on future visits.

Sign language

Sign language translation is supported in a separate video player, synchronized with the main player. Tips for filming a sign language interpreter are available from Signing Books for the Deaf:

If multiple video sources are already provided (e.g., an MP4 and WebM file), then the sign language video must be available in both of these formats. For each video source that has a sign language version available, add a data-sign-src attribute to the <source> element for that video. The value of this attribute is a path pointing to the sign language version of the video. If a sign language version is available, a sign language button will be added to the media controller. This button will toggle the display of a pop-up window in which the sign language video will appear. Users can move or resize the pop-up window with either mouse or keyboard.

Unfortunately this feature is not currently supported on iOS.

Setup Step 4: Review User-Defined Variables in ableplayer.js

The JavaScript file initialize.js includes a block of user-defined variables that can be modified from their default settings, such as volume, color of controller buttons, seek interval for rewind and forward buttons, and others. Explanations of each variable are provided in the comments.

If you make changes to this or any other JavaScript script files, the player will need to be recompiled before your changes will take effect. To do so, run the shell script compile.sh.

Playlists

An Able Player playlist is an HTML list of tracks. A playlist can accompany either a video or audio player, but both audio and video cannot be combined within a single playlist. The list can be either ordered (<ol>) or unordered (<ul>). The size of the media player is controlled via the media player itself (e.g., with width and height attributes on the <video> element). Each item in the playlist is scaled to fit the player.

The following attributes are supported on the list element:

  • class - required; must be able-playlist
  • data-player - required; must reference the ID of the media player in which the playlist should be played.
  • data-embedded - optional; add this attribute if you want your playlist to be embedded into the media player. If this attribute is omitted, the playlist will be external to the player and will appear wherever you place it on the web page.

Within the playlist, each list item can include the following HTML attributes:

  • data-poster - path to an image file.

The following HTML elements must be nested inside each list item:

A <span> element with class="able-source" for each <source> element that is to accompany the media. When the user selects an item from the playlist, its able-source <span> elements will be copied to <source> elements and loaded for playback. For each attribute that will ultimately be on the media's <source> elements, add the same attributes to each <span>, prefaced with data-.

Within the playlist, each list item must include the following HTML elements:

  • A <span> element with class="able-source" for each <source> element that is to accompany the media. When the user selects an item from the playlist, its able-source <span> elements will be copied to <source> elements and loaded for playback. For each attribute that will ultimately be on the media's <source> elements, add the same attributes to each <span>, prefaced with data-.
  • A <span> element with class="able-track" for each <track> element that is to accompany the media. When the user selects an item from the playlist, its able-track <span> elements will be copied to <track> elements and loaded for playback. For each attribute that will ultimately be on the media's <track> elements, add the same attributes to each <span>, prefaced with data-.
  • A <button> element with type="button". Inside the button, include either text, an image, or both. This content would typically be the title of the item. If using an image alone, be sure to add a meaningful alt attribute. If the image is purely decorative and is accompanied by text, using alt="".

The following example shows a playlist with two videos. The first video has one source (an MP4 file), and two tracks (captions and descriptions). The second video is hosted on YouTube, and has both a non-described and described version. It also has a locally-hosted chapters track.
Able Player supports mixed playlists, with videos hosted locally or on YouTube. Vimeo videos are not yet supported within playlists.

<ul class="able-playlist" data-player="my_video_player">
  <li data-poster="video1.jpg">
    <span class="able-source" 
      data-type="video/mp4" 
      data-src="video1.mp4">
    </span>
    <span class="able-track" 
      data-kind="captions" 
      data-src="video1_captions_en.vtt" 
      data-srclang="en"
      data-label="English">
    </span>
    <span class="able-track"
      data-kind="descriptions"
      data-src="video1_description_en.vtt"
      data-srclang="en"
      data-label="English">
    </span>
    <button type="button">
      <img src="video1_thumbnail.jpg" alt="">
      Title of Video 1
    </button>
  </li>
  <li data-youtube-id="xxxxxxxxxxx" data-youtube-desc-id="yyyyyyyyyyy">
    <span class="able-track"
      data-kind="chapters"
      data-src="video2_chapters.vtt"
      data-srclang="en"
      data-label="Chapters">
    </span>
    <button type="button">
      <!-- thumbnail will be retrieved from YouTube -->
      Title of Video 2
    </button>
  </li>
</ul>

For additional examples of both audio and video playlists, see the Able Player Examples page.

Supported data-* audio types:

  • mp3
  • ogg or oga
  • wav

Supported data-* video types:

  • mp4
  • webm or webmv
  • ogg or ogv

When a playlist is included on a page, the <source> elements within the <audio> or <video> tags are optional. If they are provided, they should match the first item in the playlist.

Interactive Transcript

Able Player interactive transcripts are generated automatically from WebVTT chapters, descriptions, and captions/subtitles files. If a transcript is available, a Transcript button will be added to the Able Player controller.

Features of the interactive transcript include the following:

  • Clicking anywhere in the transcript starts playing the media at that point.
  • This same functionality is accessible to keyboard users, who can tab through the transcript and press Enter at any point to start playing the media at that point. Since this creates a lot of extra tab stops on the page, this might be undesirable functionality for some keyboard users so it’s disabled by default. It can be toggled on/off in the Preferences dialog.
  • Text in the transcript is highlighted as the media plays. This can be toggled on/off in the Preferences dialog.
  • If subtitles are available, the transcript can be displayed in any supported language. Available languages can be selected from a dropdown select field.

If the transcript is assembled from multiple sources, any timing imperfections between sources come sometimes lead to problems in the read order within the transcript. For example, a new chapter should start before any captions or descriptions within that chapter. If the chapter starts a millisecond later than its first caption, the chapter name will appear in the transcript as a heading after its first caption. To help authors/developers attain perfect synchronization between all timed text files, Able Player (in version 3.1.6) introduced a Video Transcript Sorter (VTS). The VTS displays all timed text content from all sources in a table, and provides several features that enable users to rearrange content and modify start and end times. Users can also insert new content into the table, which can be useful for authoring low frequency content such as chapters and description. Too use VTS, add the following HTML to the desired location within any web page that includes an Able Player instance:

<div id="able-vts"></div>

YouTube Support

To play a YouTube video in Able Player, simply include a data-youtube-id attribute on the <video> element. The value of this attribute can be the video's 11-character YouTube ID, or a YouTube URL in any of the following formats (where xxx is the 11-character ID):

If a described version of the video is available on YouTube, include a data-youtube-desc-id attribute on the <video> element. The value of this attribute can be the 11-character YouTube ID of the described version (or a YouTube URL, in any of the above formats).

If users turn on the Description button on their player controller, the described version of the video will be loaded instead of the non-described version.

Important Changes to YouTube Support

On November 10, 2021, Google eliminated the timedtext API, which for years had been a dependable, albeit undocumented, means of getting access to YouTube caption files. Able Player version 4.3.27 restores Able Player's ability to toggle captions on and off using the CC button, and to select available languages from a popup menu. However, it is no longer possible to have full Able Player functionality unless captions and subtitles are hosted locally. See the section below on Limitations of hosting captions and subtitles on YouTube or Vimeo.

Vimeo Support

To play a Vimeo video in Able Player, simply include a data-vimeo-id attribute on the <video> element. The value of this attribute can be the video's Vimeo ID (a string of numbers or characters), or it can be a full Vimeo URL, such as https://vimeo.com/xxx where xxx is the Vimeo ID.

If a described version of the video is available on Vimeo, include a data-vimeo-desc-id attribute on the <video> element. The value of this attribute can be the Vimeo ID or URL of the described version. If users turn on the Description button on their player controller, the described version of the video will be loaded instead of the non-described version.

Note that Vimeo currently has some limitations:

  • A Plus, Pro or Business account is required in order to hide Vimeo's default controller. If videos are hosted on a free account, the Vimeo controller and Able Player controller are both shown. The Vimeo controller disappears temporarily after playback begins, but until then having both players present is cluttered and confusing.
  • A Pro or Business account is required in order to change playback rate (with faster and slower buttons). This functionality is not supported with a Plus account. Even with a Pro or Business account, this feature is off by default and "Speed controls" need to be enabled within the settings for each video.

In addition, if captions and subtitles are hosted on Vimeo, Able Player can control toggling them on/off and choosing languages via the CC button. However, Able Player's full functionality is not available. See the section below on Limitations of hosting captions and subtitles on YouTube or Vimeo.

Limitations of hosting captions and subtitles on YouTube or Vimeo

If captions and subtitles are hosted on YouTube or Vimeo, Able Player can control toggling them on/off and choosing languages via the CC button. However, Able Player's full functionality is not available. Specifically:

  • Able Player is unable to auto-generate an interactive transcript from the caption text.
  • Able Player's caption search features don't work.
  • Users have limited control over how captions are displayed. If captions are hosted locally, users have control over their position, font, font size, text and background colors, and opacity through the Caption Preferences dialog. If captions are hosted solely on YouTube, users can change font size via Able Player but not the other settings. If captions are hosted solely on Vimeo, users have no control over their appearance via Able Player.

Given these limitations, we recommend storing captions and subtitles locally and referencing them with a <track> element. In fact, all local <track> elements (captions, subtitles, chapters, descriptions, and metadata tracks) work for YouTube and Vimeo videos, just as they do for videos hosted locally.

If captions and subtitles are hosted locally, in addition to being hosted on YouTube or Vimeo (i.e., to ensure accessibility of videos when viewed directly on these platforms), the local captions will take precedence in Able PLayer in order to provide full functionality.

MIME Types

If your media doesn’t play, one possibility is that your web server is attempting to serve up the media with the incorrect MIME type. On Apache, this can be correct by adding the following commands to the .htaccess file:

# Audio MIME Types
AddType audio/mpeg mp3
AddType audio/mp4 mp4
AddType audio/mp4 mpa
AddType audio/ogg ogg
AddType audio/ogg oga
AddType audio/wav wav

# Video MIME Types
AddType video/mp4 mp4
AddType video/ogg ogv
AddType video/webm webm

If you don’t have access to your server’s .htaccess file, you should be able to view and add MIME types somewhere within your server’s control panel.

If your site is running on a Windows server, consult the documentation from Microsoft. For example:

Keyboard Shortcuts

Able Player includes several keyboard shortcuts that enable users to control the player from anywhere on the web page, as follows:

  • p or spacebar = Play/Pause
  • s = Stop
  • r = Rewind
  • f = Forward
  • b = Back (previous track in playlist)
  • n = Next (next track in playlist)
  • c = Captions
  • d = Description
  • m = Mute on/off
  • v or 1-9 = Volume
  • e = Preferences

Note that modifier keys (Alt, Control, and Shift) can be assigned by clicking the Preferences button on the player. If users find that shortcut keys aren’t working as advertised, they might have better success by selecting different combinations of modifier keys to accompany the default shortcut keys.

By default, keyboard shortcuts must be accompanied by Alt + Control.

User Preferences

One of Able Player’s accessibility features is that the player is highly customizable by users. The controller includes a Preferences button that allows users to change default preferences and settings. Their changes are stored in a browser cookie and in most cases should therefore be preserved the next time they visit the site. Specifically, users can control the following:

  • Modifier keys: Add Alt, Ctrl, or Shift to the Able Player keyboard shortcuts to avoid conflicts with other applications.
  • Closed captions on by default
  • Description on by default
  • Use text-based description if available.
  • Automatically pause video when text-based description starts
  • If using text-based description, make it visible
  • Transcript on by default
  • Highlight transcript as video plays
  • Keyboard-enable transcript

Building the Able Player source

The source JavaScript files for Able Player are in the /scripts directory, and the source CSS files are in the /styles directory. These source files are ultimately combined into several different files (in the /build directory) using npm and Grunt:

# Install Grunt globally 
npm install -g grunt-cli

# Install project dependencies
npm install

# Build CSS and JS
grunt

The npm and Grunt build process is defined by the Gruntfile.js and package.json files. (Note that the version number is specified in package.json, and must be updated when a new version is released).

Files created by the build process are put into the /build directory:

  • build/ableplayer.js - the default build of ableplayer.js
  • build/ableplayer.dist.js - a build of ableplayer.js without console logging
  • build/ableplayer.min.js - a minified version of the dist file
  • build/ableplayer.min.css - a minified combined version of all Able Player CSS files

Acknowledgments

  • Able Player development is supported in part by the AccessComputing project at the University of Washington, with financial support from the National Science Foundation (grants #CNS-0540615, CNS-0837508, and CNS-1042260).
  • Additional support has been provided by the Committee on Institutional Cooperation (CIC).
  • Turtle and rabbit icons (available as optional alternatives for the speed buttons) are provided courtesy of Icons8.
  • Sample video tracks are provided courtesy of The DO-IT Center at the University of Washington. Additional videos are available on the DO-IT Video website, which uses Able Player.
  • Sample audio tracks feature songs by Terrill Thompson, Able Player's creator and lead developer. Check out Terrill's music site for more listening, and to support his work.

ableplayer's People

Contributors

blrichwine avatar brunetgarcia avatar dukeluke87 avatar egyrs avatar elosoman avatar frirasyidi avatar harlet avatar head0nf1re avatar jannrobert avatar jedilin avatar jessehall3 avatar joshmoreno avatar karate avatar marstyson avatar motchie avatar oleguldberg avatar orthotypos avatar owenedwards avatar richard-smith-preservica avatar rococode avatar sebastiankelle avatar slinhart avatar sniderl avatar stefanwallin avatar terrill avatar tikicoder avatar unclekeulfried avatar vierkantemeter avatar vincenthelwig avatar ylahav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ableplayer's Issues

Localize language of UI elements

Add functionality to localize all readable text (alt attributes, title attributes, help text, labels, errors and other messages) so it can be easily translated into non-English languages.

Use this.lang and this.langOverride to control which language gets served up to the user.

Function getPageLang() checks for language of web page. Currently it doesn't do anything with this information. Need to add code to check whether the language of the web page has a translation available, and if it does, change this.lang to that language.

Remove secondary confirmation in preferences dialog?

Is there any need for the confirmation of number of options changed after saving the preferences page? Overall flow would be improved by removing this, so we're motivated to do so unless there's an accessibility need.

Caption - missing switch of states

The Caption-Div has always the aria-hidden="true" and there's only a switch between the css property display block and none. Shouldn't the aria-hidden also switch? Can't the JAWS-Focus-Bug fixed by adding some Aria-Live-Regions?

Adding following Code in L2523 should fix this:

this.$captionDiv.attr( { 'aria-hidden': this.captionsOn } );

and same goes here in L548:

// move this from L553 before L546
if (this.prefCaptions === 1) { 
      // user wants to see captions
      this.captionsOn = true; 
    }
    else { 
     this.captionsOn = false;
}

// change the Attr on this.captionDiv to:
'aria-hidden' : !this-captionsOn,

Improve support for text-only zoom

Currently when users zoom with text only, controller icons (or images) grow beyond what the controller bar will accommodate. The icons wrap vertically but the controller div isn't expanding to accommodate this.

Also, the wrapping icons look a little funky. Might consider ways to make them more aesthetically appealing when wrap occurs.

Add support for adjustable playback rates

There is already code for this in ableplayer.js. I experimented with it in the past but browsers' implementation was not consistent enough to deploy it.

See function addControls()
To begin testing, change var useSpeedButtons to true if the browser supports media playback rate.

status-bar is updated too frequently

this.$status.text is being updated constantly within the refreshControls() function.
Since this element has role="alert" the result is screen readers constantly announcing the update. This content should only be refreshed if there's a change.

IE8 compatibility

RegExp's have some bug in IE8 which is preventing the transcript parser from working. In addition, icomoon fonts are not functioning for an unknown reason, so either a fix is needed or buttons need to be updated to use images again. There are also several display issues.

Do we want to pursue this?

Add support for playing media segments

Requires discussion.

Currently the AblePlayer object supports startTime as a parameter.
Could also support endTime or duration.

If we add that support, what happens when the end of the segment is reached? Does the media pause, stop, or return to the start?

If the media element includes a loop attribute, should the player loop only through the segment?

Should it be possible for users to seek outside the beginning and ending of the media segment?

Transcript lock button display issues

Transcript lock button and bar displays even when no transcript div is visible; additionally, transcript lock button just reuses the transcript icon. Need to find a lock icon instead.

Add robust support for mobile

How should Able Player behave on mobile devices? Need to consider what's practical and possible on various platforms then implement an appropriate custom/responsive design.

Improve support for Windows high-contrast mode

In Windows 8.1, with high contrast enabled:

  • The border that surrounds the player appears in the default text color of the high contrast theme (e.g., yellow in High Contrast 1, green in High Contrast 2, white in High Contrast black, and black in high contrast white.
  • The visible focus indicator that's been added to the CSS has no effect
  • AblePlayer uses transparent png images for each button, and the developer can set this.buttonColor to either 'white' or 'black', which controls which button gets displayed. White buttons work great if the background is black, but if users have "High Contrast White" as their color scheme, the white buttons are invisible. Conversely, if the developer is using the black buttons on a light background, these disappear when the user switches to a high contrast scheme that has a black background.

Integrate transcript feature into player

Add a button to controller for displaying transcript (is there a standard icon for transcript? Maybe the one YouTube is using?)

If there is more than one language available (e.g., captions and subtitles) display a menu that allows the user to select a language for the transcript (it can be different from the caption language). See also #9. Be sure to add a lang attribute to the transcript container.

When button is pressed, display an AblePlayer transcript with all the supported markup (as documented in README.md. Where should this be shown? One possibility:

  • If there's room to the right of the player, place it there.
  • If not, place it beneath the player.
  • If there's no room at all, don't include a transcript button the controller

Currently AblePlayer includes a PHP script (php/ableplayer-transcript-maker.php) that creates an AblePlayer transcript from one or more VTT files. This could be ported to JavaScript.

Regarding the display, test7b.html currently shows an interactive transcript with a fixed height. It would be good I think to keep the transcript and media player visible on the screen if possible. However this creates complications as text is being highlighted. I tried implementing the JQuery scrollTo() method in function highlightTranscript() to force content to scroll into the transcript parent div. However, this doesn't work well. If the user scrolls down manually to read ahead, it automatically scrolls back up. One solution might be to listen for the users' scrolling behavior. If the user scrolls at all, disabled ScrollTo() for a period of time, perhaps permanently for the duration of this session.

Chrome and Opera show two sets of captions if <track> has "default" attribute

Confirmed in Opera 21 and Chrome 34.0.1847.131 that having a <track> with the "default" attribute results in captions being displayed by the browser's default HTML5 player. If users are also displaying the Able Player captions, this results in two sets of captions being displayed on top of each other.

ableplayer_double_captions_chrome

This is NOT a problem in Safari 6.1.2 (Opera, Chrome & Safari were all tested on Mac OS X). It is also not a problem in IE11 (Windows 8.1)

Two possible solutions might be:

  1. Do whatever we need to do with the default attribute, then remove it from the DOM (default is not currently supported, but that's another issue).
  2. Use CSS to hide the browser's captions. Not sure how to do this, or if it's even possible.

Keys are intercepted by player when typing in form fields

Pressing the spacebar to select/deselect a checkbox in the modal settings window causes the player to play/pause. AblePlayer.prototype.handlePlay should check for the presence of the settings modal and not play/pause if it is active.

Add Caption Display Options

YouTube offers several options for setting caption style, available by clicking the CC button then clicking "Options".

Since Able Player has a Preferences button I think that would be the better place for these options, plus they can be stored in the cookie along with other Preferences data.

Keyboard shortcuts sometimes don't work with screen readers in Windows

Support for hot keys is sporadic. Maybe this is just a matter of providing Shift as an additional modifier key in order to increase likelihood of avoiding conflicts? Could try that, but with Ctrl and Alt as modifiers none of the assigned keystrokes work in IE11 (Windows 8.1). They don't serve any other function either, so there don't appear to be conflicts - just keystrokes that aren't being passed to Able Player.

From my tests:

  • VoiceOver in Mac OS X: Hot keys work from anywhere on the page with or without modifier keys.
  • In IE11 (Windows 8.1) hot keys don't work at all, with or without modifier keys (as set in Preferences). JAWS 15 announces the keystrokes (e.g, "Alt Control P") but they don't have any effect. NVDA 2004.1 says and does nothing when various key combinations are pressed.
  • In Firefox 29.0.1 (Windows 8.1), hot keys don't work without modifier keys, but they DO work with Ctrl or Alt enabled. This is the same with both JAWS 15 and NVDA 2004.1

Safari in Mac OS X doesn't play media with non-zero startTime

In Test2 (audio with non-zero start time and autostart), Safari doesn't seem to play the media at all. It doesn't auto-start, and it gets stuck perpetually buffering if the user clicks play manually.

I'm observing this in Safari 7.0.4 (Mac OS X 10.9.3) and Safari 6.1.4 (Mac OS X 10.8.5).

Replace forward & back buttons with accessible slider

There's already some scaffolding for this:
boolean this.useSlider makes it optional
if this.useSlider is true, there's a browser check to see if is supported. If it is, an is added to the controller bar.

This was implemented in an early version of AAP (predecessor to the current project), but disabled because browsers' default sliders were inadequate (ugly and buggy).
Not sure of the current state browser support for this, but we could always use a different approach. Some examples of accessible sliders:

iOS Phone Compatibility

iOS Phones always play video in fullscreen, and this can't be turned off as far as I can tell. This means that most of the custom video components are useless on iOS Phones.

The only utility I can find for displaying components at all is allowing the user to switch to a track including audio descriptions, or perhaps to read the transcript separately. The native player includes it's own control for selecting closed captioning tracks.

Given this, do we want to display anything for iOS phones, and if so what?

Add support for autoplay attribute?

Currently, if a non-zero startTime is passed to the AblePlayer object, the player automatically begins playing when ready. The assumption is that a user has already clicked something with the expectation that the media will begin playing at that point.

After pondering this though, I think there will be other scenarios where the media will begin playing at a particular start point, but only when the user gives it the ok. For example, maybe there's some introductory text on the page to be read first.

So, maybe the choice of whether to play automatically should depend upon whether the media element has an autoplay attribute, rather than a startTime.

Add per-player shortcut keys

This requires discussion.

Currently shortcut keys work anywhere on the web page, which is great because it allows users to pause, mute, etc. immediately without requiring that they return focus to the player.

If there's more than one player the shortcut keys can only work for one. So in that case, keystrokes should only be handled if a player has focus.

However, I'd like to preserve the current full-page keystroke functionality on pages where there is only one player. Good idea or not?

The good: Control the player from anywhere, as described above.
The bad: Inconsistent behavior. Sometimes the player requires focus, other times it doesn't. This confuses users and is bad usability.

I personally think the good outweighs the bad.

Add support for playback of selected text block within interactive transcript

Currently if a user clicks on the interactive transcript the media begins playing at that point in the transcript.

This enhancement would allow users to select a block of text. When they do so, just that block would play. When finished, the video would pause and users would have to resume playback using "P" or space.

See related issue #18

Add support for caption styles: pop-on vs roll-up

Add a Caption Style preference to Preferences dialog that gives users a choice of "pop-on" or "roll-up" captions.

Currently captions are displayed as pop-on (each new caption overwrites the previous caption in div.ump-captions). This should continue to be the default setting.

Roll-up captions scroll text up one line at a time (should users be able to scroll back? Need to consider how best to implement this)

Replace PNG buttons with SVG icons/fonts

The scaffolding is in place to support this now (including fonts in the fonts folder, and associated icomoon font styles in ableplayer.css). However, we need to work on implementation and carefully consider and test for accessibility and browser compatibility.

One known issue: Users whose custom style sheets include font-family definitions can override the icon font. The solution might be to detect computed font-family for the controller, and if it isn't icomoon, fall back to the original PNG files.

Screen readers not reliably announcing labels on buttons in Firefox.

The label on each <button> is marked up as a title attribute.
If icon fonts are used, this is the only label available to screen readers.
If images are used, they have alt="" in order to prevent redundancies, based on the assumption that screen readers all support title on buttons.

Need to explore this issue further to find a solution...

Here are the details (scenarios marked with bold text and "FAIL:" are problems):

JAWS 15

  • Firefox, navigating with tab: says "button" then the label
  • FAIL: Firefox, navigating with arrows in virtual mode: just says "button"
  • IE11, with tab or arrows: says label then "button"

Window-Eyes 8.4

  • FAIL: Firefox, with tab: just says "button"
  • Firefox, with arrows: says "button" then label
  • IE11, with tab or arrows: says label than "button"

NVDA 2014.2

  • Firefox, with tab: says "button" then label
  • IE11 with tab: says label then "button"

VoiceOver in Mac OS X (Mountain Lion) in Safari

  • with tab: says label then "button"
  • with VO + right arrow: says label then "button"

Make all buttons and controls optional

I think it's desirable to allow user/developers to determine which buttons and controls are included in their player. For example, some user/developers may want a lean player with nothing but a play/pause button. Some won't want full screen; others won't want an interactive transcript; etc.

On the other hand, some options should arguably NOT be optional, such as Captions and Descriptions buttons. But where do we draw the line?

  • Playback rate - I can imagine some user/developers not wanting this feature, but it improves accessibility.
  • Full screen - Same
  • Preferences - Same
  • Help - Same

How dictatorial do we want to be about user/developers using the accessibility features of the player? If they opt out they might be compromising accessibility.

Add support for creating mashups from transcript

This is a low priority, but would be cool. It's a vague idea that needs to be thought through and fleshed out:

  • User selects multiple blocks of text from the interactive transcript, e.g., by highlighting the text.
  • User elects to "keep" that text, perhaps with a shortcut key, which adds the text to a queue, along with start and end time (start time = the data-start attribute on the first span of the select text block; end time = the data-end attribute on the last span of the selected text block).
  • As the user selects blocks, they're all added to a playlist
  • From the playlist, user can play them in sequence
  • User can rearrange the order of the blocks within the playlist (either by dragging and dropping or changing the number within a text field). Would need some checks & balances for the latter to handle invalid sequences of numbers.
  • Users can "Save" their final playlist/mashup so it can be replayed again later or shared with others. This presumably would be a URL that passes parameters via GET that would be handled by the player.

Add support for synchronized sign language

This requires discussion.

HTML5 doesn't support synchronized sign language with <track kind="signlanguage"< or anything similar. So this will have to be custom solution involving two <video> elements that are explicitly connected somehow. Perhaps we could add an attribute like data-sign="sign_id" where sign_id is the id of the companion video.

The companion video should just be a video with no controller, and its operation should be synchronized with the main video player.

Where to position the companion video would require some experimenting and user testing. I think a floating-on-top, resizable div would be nice so users have total control.

NOTE: There is already a sign language button added to the controller if this.hasSignLanguage is true.

Seamlessly toggle described vs non-described versions

This requires discussion.

Currently when a user presses the Description button (if "Use text-based description" is not checked) the original media (src) and described media (data-desc-src) are swapped. When this happens the new video begins playing at the beginning.

This could be made more seamless by saving the user's current position at the point when they click the Description button, and starting playback the new video with the user's last time as startTime.

This seems like a good idea but I'm not sure how it impacts overhead since two media files will be loaded by the player.

Add optional auto-pause with text-based audio description

If users have text-based audio description enabled, their screen reader will read the audio description text as it's written to div.ump-descriptions (it has role="alert").

The problem: We have no way of knowing the speed of users' screen readers. The VTT description file includes end times for each description, but these are assigned arbitrarily by the person writing the description text - there's no way to guarantee that screen readers will have finished reading at that time.

The solution: Add a Preference to the Preferences dialog for "Auto-pause video when audio description starts". This is off by default. If a user checks this option, automatically pause the video at the point when audio description begins. Then the user must press the play button (with "P" or space) to begin playing again.

IE7 Compatibility

Player has serious issues in IE7. What are the goals for IE7, what issues are in the way, and what is the priority for fixing them?

First item in playlist is not properly initialized if audio includes source elements

According to the documentation, when a playlist is present, <source> elements within the <audio> element are optional. If they're present, they must match the first item in the playlist.

Currently, if no <source> is present, the first item in the playlist is highlighted (via class="ump-current") and the title of the track is added to div.ump-now-playing. However, if the <audio> element contains one or more <source> element, neither of these things is happening.

Also, if a user breaks the rules and has <source> elements that are different than the first item in the playlist, I think they should be replaced with the first item in the playlist.

Consider alternative fallback solutions

Currently the supported fallback solution is JW Player, but that requires a separate license and is a bit bulky.

Would be nice to include a lightweight Flash shim along with the AblePlayer distribution, something that doesn't require a separate license.

Possible alternatives:

Add full screen button

Should maintain Able Player controls at full-screen resolution.

How to handle fullscreen on mobile is another issue (to be considered in the context of the overall mobile experience)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.