Skip to Content

Tools & Guidelines
ccPlayer AS2 Version Help Documentation

ccPlayer AS2 version – Sample Flash Video Player

These instructions are for the older AS2 version of ccPlayer. The most current version of the player is ccPlayerAS3.

In addition to the CCforFlash component, NCAM has created a flexible video player which incorporates a CCforFlash component. If you are not handy with Flash programming but want to embed a FLV player on your Web page, ccPlayer.SWF may be sufficient. To see how it all gets wired, open ccPlayer.html in a text editor. Pay particular attention to the <object> and <embed> sections:

Use the sample html file, ccPlayer.html; shown in the image below, as a guide to create a Web page containing a captioned Flash Video file.

screengrab of ccPlayer window

Programming the ccPlayer


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/SWFlash.cab#version=8,0,0,0"
width="340" height="376" id="ccPlayerSample" align="middle">

<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="ccPlayer.swf?ccVideoName=car.flv&ccVideoAutoStart=false&ccVideoBufferTime=5
&ccCaptSourceType=external&ccCaptionSource=car.dfxp.xml&ccCaptionLanguage=en&ccCaptionAutoHide=false
&ccOverrideFileStyle=false&ccDisplayRollup=false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />

<embed src="ccPlayer.swf?ccVideoName=car.flv&ccVideoAutoStart=false&ccVideoBufferTime=5
&ccCaptSourceType=external&ccCaptionSource=car.dfxp.xml&ccCaptionLanguage=en&ccCaptionAutoHide=false
&ccOverrideFileStyle=false&ccDisplayRollup=false" allowFullScreen="true" width="340" height="376" name="ccPlayerSample" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" />

</object>

In particular, note the parameters that are passed into the movie <object> and src <embed> parameters. The ten parameters, in addition to the SWF name, are:

  • ccVideoName - This just identifies the FLV to play. (required)
  • ccVideoAutoStart - This signifies whether the video immediately starts to play when loaded (true) or to pause (false) and wait to be started. (optional, defaults to false)
  • ccVideoBufferTime - The number of seconds to buffer the FLV file in memory before beginning playback. (optional, defaults to 0)
  • ccCaptSourceType - This replaces the ccEmbeddedCaptions parameter and is used to identify the type of source where the caption information is being stored. (required)
The following values are valid:
  • external – external timed-text file
  • embedded – embedded in the video
  • ccCaptionSource - This replaces the ccCaptionFilename parameter and is used to provide the URI for a DFXP or QTtext file. If the ccCaptSourceType is "embedded", this parameter is not used. (optional)
  • ccCaptionLanguage - Used to identify which language <div> to select in a DFXP file. (Ignored for QTtext.) Must match the value defined in the xml:lang attribute of the <div>. (optional)
  • ccCaptionAutoHide - This signifies whether captions are initially displayed (false) or hidden (true). (optional, defaults to false)
  • ccOverrideFileStyle - This signifies whether to use the default caption style settings of the ccPlayer (true) or the global style settings that may be included in the external caption files (false). (optional, defaults to false)
  • ccDisplayRollup - Used to identify whether the captions should be displayed in roll-up mode (true) or pop-on mode (false). (optional, defaults to false)
  • ccDisplayLines - If the ccDisplayRollup is set to true, this signifies how many lines of captions should appear within the caption display area. (optional)

Also note: If you wish to allow for full-screen display, you'll need to include the "allowFullScreen" parameter to the <embed> and <object> tags.

Creating Captions


For information on how to author captions for use with ccPlayer, please refer to Authoring Captions for Flash.

ccPlayer Accessibility


Various accessibility features have been built into the ccPlayer. Currently, in order to access the keyboard and screen-reader features, the user needs to be using the Internet Explorer browser on the PC. The accessibility features that have been included are:

Closed captioning


Closed captioning is available if captions have been provided with the video. Captions can be provided in an external file using either the DFXP or QTtext formats or embedded within the video using a tool such as Captionate. When captions are available, a CC button is displayed allowing viewers to hide or show the captions. If captions are not available, the button is disabled.

Labels on buttons


All of the buttons have been given labels for use with screen readers. They include:

  • play
  • pause
  • stop
  • rewind five seconds
  • forward five seconds
  • hide captions
  • show captions
  • volume down
  • volume up
  • search window
  • caption language window
  • instructions window
  • show fullscreen video
Note: When the Search, Language, or Instructions windows are open, the video is paused. When the windows are closed, the video resumes playing, if the video was playing prior to the window being opened.

Keyboard shortcuts


In order to use the keyboard shortcuts, the Flash Player movie needs to have focus. This is typically done by tabbing to the Flash movie and pressing the enter key or spacebar. Screen-reader users will need to have the virtual pc cursor mode off to access the keyboard shortcuts.

The following keyboard shortcuts are available:

  • p – play/pause
  • e – end (stop)
  • r – rewind 5 seconds
  • f – forward 5 seconds
  • u – volume up 20 percent
  • d – volume down 20 percent
  • c – captions on/off
  • m – full-screen video
  • i – instruction window
  • s – search captions for text strings
  • l – select language

Screen-reader access of the search window


While the search window is open, ccPlayer limits tabbing to only the contents inside the window. There are three objects in this window: the search edit text box for the search term, the search activation button, and the close search window button. In our JAWS testing, it was noted that if the user tabbed past the close search window button, the next button outside of the window was read, even though the focus had returned to the search edit text box. If this occurs, shift-tab will correctly speak the contents of the window.

Screen-reader access of the caption language window


When the caption language window is opened, the focus goes to the language that is currently being played in the captions. If additional languages are available, these languages can be found by using the up and down arrow keys. In this window, the tab key serves to select the currently-highlighted language. The escape key will close the window without changing the current language.

Screen-reader access of the instructions window


In order to read the instructions, the screen-reader must be in virtual pc cursor mode. The instructions appear after the the close instructions window button.

Accessibility issues


Users of JAWS 9 will notice that dynamically-changing text will be read when the change occurs. This will be most noticeable each time a new caption appears. To stop JAWS from reading the captions, use the hide captions button to hide the caption display.

The video playback controls in the full-screen mode are not accessible to keyboard and screen-reader users. Keyboard control is limited to exiting the full-screen mode using the Escape key. Note that full-screen mode does not function properly unless the virtual pc cursor in JAWS is off. The full-screen mode has not been tested with Window-Eyes.

Known Issues


Controls appear squeezed when viewed in full-screen mode – The full-screen mode is a work in progress. At this time, the focus of our efforts was on providing the largest posible viewing area for the video.

Accessibility in Full-screen mode – The video playback controls in the full-screen mode are not accessible to keyboard and screen-reader users. Keyboard control is limited to exiting the full-screen mode using the Escape key. Note that full-screen mode does not function properly unless the virtual pc cursor in JAWS is off. The full-screen mode has not been tested with Window-Eyes.

Technical Support


For technical support, please use the public CC for Flash listserv. To subscribe send an e-mail to requests AT mail4 DOTwgbh DOT org with the words subscribe CCforFlash in the subject.