Using the JAWS Scripts For Youtube
Last Revised June, 2019
This guide provides tips for using these scripts with Youtube and Youtube Music, collectively referred to as Youtube except where differences must be noted.
When the scripts are installed and Youtube is open and focused in a supported browser, this document can be
opened via a double press of JAWSKey+F1 (or Insert+F1).
Note that Youtube provides many keystrokes that do not require scripts, though they usually do require forms
mode, pass-key-through, or disabling of the virtual cursor. These scripts simplify using some native commands
while providing a few other shortcuts not provided by Youtube itself.
Table of Contents
These scripts require the following for correct operation with the Youtube web site:
- JAWS 17.0.1806 or greater. (JAWS versions prior to 17.0 do not support web site specific scripts.)
The original JAWS 17.0 release did not include the
GetElementXML() function that was added in the
JAWS 17.0.1806 release in April, 2016.
- A browser supported by JAWS 17.0 or later. At this writing, these are
Internet Explorer, Firefox, and Google Chrome.
These scripts will not work in Microsoft Edge at this time.
To install these scripts on a new system:
- Load JAWS if this has not already been done. This will require
administrative privileges on the computer.
- Run JAWS as the user for whom the scripts are to be installed.
This and the following steps must be performed for each user of the computer
who will be using JAWS with these scripts.
- Download and run, or run directly, the installer for these scripts; and follow the on-screen
directions. Be sure to install the scripts in the currently running
JAWS version if a JAWS version list is presented.
- To verify successful installation, type Ins+Q while
Youtube is in focus in a supported browser. Part of the JAWS spoken response should be a revision number. If
you do not hear a revision number, the scripts are not correctly loaded.
Many commands below are key sequences rather than key combinations. All of these sequences begin with a "command"
key, by default the left bracket ([).
This avoids collisions between script commands and native browser keystrokes.
Users can change the prefix key if necessary by typing [ followed by JAWSKey+C or Ins+C. The change will
survive across script and JAWS updates.
The scripts provide the following key sequences:
Note that some of the above commands, before executing, will attempt to press the "Hide Cards" button if present on screen, so that controls required by the script commands become available for action.
If this button is found and pressed, JAWS will say "Hiding cards" before completing the command.
- [ S
- Skip Ad. If a video ad is playing and a Skip button is present, this command will click it to make Youtube
start playing the actual video requested.
- [ Space
- Press the Play/Pause button if present. This works in both virtual cursor mode and forms mode.
- [ T
- Say Time. This command will speak the current time position in the playing video as well as the video's length.
As of February, 2019, this command also works on Youtube live streams.
If a video ad is playing, the times will relate to the ad rather than to the requested video.
Note: The current time position is not always kept up to date by Youtube itself but will be
updated if the video is paused and restarted or the play position is changed by the user.
Pausing and restarting the video will force such an update.
- [ N and [ P
- Move to the next or previous page or video. This should work in playlists and
wherever a Next and Previous button can be found.
As of May, 2019, these commands work in Youtube Music to move among songs in the active queue.
Note that the Previous button in a playlist or queue may restart the current video rather than moving to the previous video unless the video is near the beginning of its playback. Repeat the command to go to the previous video in this case.
- [ m
- Mute or unmute the current video. See also the m native Youtube command below.
- [ V
- Move focus to the volume slider for the currently playing video. This also switches JAWS into forms mode and causes
a number of native Youtube keystrokes to become usable.
- [ c
- Go to the Youtube channel that owns the current video. This command only works on a video page and does not work for Youtube Music.
The following Youtube-native keystrokes work as indicated when JAWS is in forms mode or if the keystrokes are
passed through JAWS directly to Youtube, such as with the JAWS "pass next key through" command, Ins+3.
As noted in the below list, some Youtube keystrokes require focus to be on the video's volume slider.
This list applies at least to the HTML 5 video player and possibly also to
the Flash player.
For convenience, the scripts will prevent JAWS from speaking typed characters in forms mode when focus is on a slider, so that JAWS speech will not disrupt a playing video in response to native Youtube keystrokes.
- Space (slider focus required) or K
- Pause, resume, or play the current video.
- j or l
- Rewind or fast-forward the video by a few seconds.
These commands work differently in Youtube Music as of this writing.
- Digits 1 through 9 and 0 (slider focus required)
- Jump to a percentage through the video. 0 jumps to the beginning, 1 to 10% through,
2 to 20% through, etc., and 9 to 90% through.
At this writing, Youtube Music does not support these keystrokes.
- , (comma) or . (period)
- Slow down or speed up the video without changing its pitch. This amounts to simple compression or
expansion of the audio and video. Slowing down far enough may stop playback.
At this writing, Youtube Music does not support these keystrokes.
- Up or Down arrows (slider focus required)
- Turn up or down the volume of the video by increments of 5%.
Right and Left arrows, respectively, perform the same actions and also require focus to
be on the volume slider.
The volume usually defaults to 100%.
- Mute or unmute the sound of the video. Beware that the occasional video defaults to muted on starting,
though this seems rare.
- Home (slider focus required)
- Mute the audio. This is not a toggle like m.
- End (slider focus required)
- Unmute the audio and move the volume to 100%. This is not a toggle like m.
- Toggle between full screen and normal video size.
- / (slash)
- Move focus to the Youtube search box.
- ' (apostrophe)
- Pop open and move focus to the Find bar for about four seconds.
This keystroke does not apply for Youtube Music as of this writing.
The scripts include a system for handling text chatting during a live stream:
Type the prefix key, the left bracket ([) by default, then type as many of the following keys as desired to navigate among chat messages. Press Esc to exit the chat review mode when done.
The navigation keys comprise the right-hand portion of the home row on a standard English US QWERTY keyboard:
h goes to and reads the first message, j the previous from current position, l the next from current position, and the semicolon (;) the last message available.
k repeats the last-read message.
Note that the above features also work in a stream playback after the stream has ended; however, observe the following caveats:
- When the recording begins playing, the chat area will contain a note indicating that chat messages will appear at the times they were initially added. This note will be replaced with actual chat messages when they begin to
appear. As a result, the reading position may be invalidated when messages begin to appear in the window.
- As messages appear during playback at the times they were originally added during the live stream, it is necessary to fast-forward
to the end of the stream to gain access to all posted chat messages.
- Rewinding the stream will also remove chats from the display and may invalidate the current reading position.
- If chat reading commands begin producing beep sounds instead of reading messages, reset the reading position with Alt+Home or Alt+End.
Issues shown in this section may be fixed in future script
revisions but are not addressed as of this writing.
Sometimes, [ V may announce the volume slider incorrectly. In this script author's
experience, this only occurs after a great number of videos, such as 50, have been played without a browser
As mentioned earlier, Youtube provides many keystrokes natively. However, most are blocked by JAWS' virtual
mode (true for other screen readers as well), making them inconvenient to use in some situations.
I wrote these scripts for at least the following reasons, not necessarily in order of precedence:
- Personal convenience (ok, that one was probably at the top).
- Potential usefulness to other JAWS users.
- A way to make more people aware of the keyboard support built into Youtube itself.
- In the words of a coworker and good friend, why not?
Here is the revision history of these scripts, most recent revision first:
- Revision 74, released June 9, 2019
This revision just updates the scripts' handling of the Skip Ad command sequence, [ s, to work again after a recent Youtube update in how the Skip Ad button is displayed.
- Revision 70, released May 24, 2019
In this revision, I had to replace the live stream chat navigation system with key sequences instead of key combinations. The primary reason was that the Alt+Left keystroke broke the standard browser keystroke for
pressing the Back button. Alt+Enter also had issues though, and Alt+Right broke the Forward button command (though I suspect that one is in less common use). Alt with Up and
Down are standard JAWS commands, and similar problems exist for arrows with any other combination of Alt, Shift, and Ctrl.
See the Special Script Support For Live Stream Text Chatting section of this document for details on the updated chat navigation system.
- Revision 68, released May 18, 2019
- Several features provided by the scripts for Youtube also apply to Youtube Music (music.youtube.com).
This document's "Using Youtube With JAWS and the Scripts" section describes this support as well as some of the native keystroke support provided directly by Youtube Music.
- Quick navigation of chat messages during a Youtube live stream, or a playback of a past stream, is supported.
See the "Special Script Support For Live Stream Text Chatting" section of this document for details.
- Revision 51, released February 24, 2019
- Youtube can display "cards" over the top of a playing video. Since this breaks several scripts, cards will be hidden as necessary before various commands are executed.
JAWS will say "Hiding cards" when this occurs.
- The [ p command for moving to the previous video in a playlist again works.
- [ t, for reading elapsed and remaining time for a video, also works on live streams.
- Typed characters are silenced while focus is on a slider and forms mode is active, so JAWS will not disrupt a playing video in response to native Youtube keystrokes.
- Source code to the scripts is no longer included. See my Script Distribution Policy document for details. As one side effect, this will cause installation to run much faster.
- Revision 41, released September 22, 2018
- Fixed the method of activating the owning channel page for the [ c command sequence so it works even if the link is not visible or is only partly displayed.
- Revision 40, released September 20, 2018
- Added the [ c command sequence for moving to the channel owning the current video.
The code for this command was contributed by Mohammed Laachir.
- Minor documentation updates.
- Revision 36, released August 13, 2018
- Another update to the Skip Ad finding code required by Youtube changes.
- This manual now contains the script revision history.
- Revision 35, released July 21, 2018
- The "Skip Ad" command is updated to recognize a revision in the Youtube Skip Ad button.
- [ m mutes or unmutes the current video and works outside of forms mode. The native Youtube m command requires forms mode or a pass-key-through operation (Ins+3).
- The installer is built with an older Nullsoft installer version, because the newer one previously used had caused some antivirus software to complain.
- The installer tries drives D and E along with C when looking for JAWS while unable to read the Windows registry.
- Revision 30, released September 2, 2017
- Fixed a problem with the previous installer, caused by a change in how the NSIS
SetRegView command works, that caused the
installer not to find any JAWS versions on 32-bit Windows.
- Failure to find any JAWS versions during installation results in a log display.
- Revision 29, released August 31, 2017
- Added JAWS 2018 support.
- Added the ability to edit the Command key by typing the current Command key (the left bracket ([) by default)
followed by JAWSKey+C.
- Revision 25, released March 3, 2017
- Important: All script commands, all of which were Ctrl+Shift with another key, are now the same key but preceded by a left bracket ([) in order to avoid collisions with various browser-specific native keystrokes.
For example, the command for skipping ads is now [ s instead of Ctrl+Shift+s.
- [ +Space (formerly Ctrl+Shift+Space) works on Play buttons when playing a playlist.
(I wrote this one in August and may have forgotten to release it.)
- [ +S (formerly Ctrl+Shift+S) should work more often for pressing the "Skip Ad" button. (Youtube changed some properties of this button and broke the original code.)
- Various user guide updates.
- Revision 17, released July 24, 2016
This is the first release of these scripts, including commands for the following:
- Skipping ads.
- Play/pause of a video.
- Announcing time position and length of a playing video.
- Jumping to next and previous videos or search results pages.
- Focusing the volume slider, which enables many native Youtube commands without interferance from JAWS.