Tools & Guidelines
CCforFlash AS3 Features
CCforFlashAS3 Features
v2.1.0
Javascript can be used to control ccPlayer's functionality
Much of the key functionality of ccPlayer has been opened up to access through Javascript. This feature makes it possible to have controls for the player in HTML or have ccPlayer react to dynamic changes in the HTML content. Using Javascript to Interact With ccPlayer provides more detailed instructions on how to set up ccPlayer and access its public methods.
Animated swfs can now be played in ccPlayer with captions
This version of ccPlayer is able to load and play back animated, linear swfs, along with their captions, which are stored in an external caption file. A new parameter ccAnimFrameRate has been provided in order to tell ccPlayer how many frames per second to play the loaded swf.
Because the CCforFlash captioning component (used in ccPlayer) reads time-based captions, it is important that the timecodes for the captions are determined based on the desired playback speed (frame rate) of the swf. More information can be found in the Authoring Captions for Flash section.
Adjustments to background colors
Three parameters have been added to change the background colors of various areas of ccPlayer:- ccMediaBackgroundColor – changes the color of the background in the media area
- ccControlBackgroundColor – changes the color of the background in the controls
- ccCaptBackgroundColor – changes the color of the background in the caption area
Adjusting the left and right side padding in the caption area
The parameter ccCaptAreaPadding has been added to provide the means of adjusting the padding on the left and right side of the caption area.Adjusting the format of the display of timecodes in the controls
The format of the three timecode displays in the controls (current time, time left, and duration) can now be adjusted using the following parameters:- ccTimeDisplayFormat – sets the format of the time displays. Possible values are hh:mm:ss, h:mm:ss, mm:ss, m:ss, and :ss
- ccTimeNoLeadingZeros – if true, suppresses the display of any leading zeros in the time areas
New version of the CCforFlash caption component maintains synchronization with SoundChannel objects
A new version of the CCforFlash captioning component (v1.0.2) is being used in ccPlayer. Prior to this version, ccPlayer used CCforFlash's manual mode for displaying captions of mp3 audio files. Now, CCforFlash can use the same caption synchronization method to display captions for both mp3 and video content.Loading an external controls swf from another server
A new parameter, ccAllowDomain, has been provided in order to identify any domain where a swf containing external controls might be stored, if it is different than the one hosting the ccPlayer swf. This will allow the buttons inside the controls to access ccPlayer's functions and parameters.Loading an mp3 file from another server
The parameter ccPolicyFile has been added to indicate whether to look for a policy file (true) when loading mp3 files that are located on a server that is different than the one hosting the ccPlayer swf.Fixed the overall security-error handling in ccPlayer
Custom Controls – If custom controls are being retrieved from a different server and Flash cannot find a valid crossdomain.xml policy file, ccPlayer will no longer crash. Instead, it will use the default controls.mp3 Audio Playback – If Flash cannot find a valid crossdomain.xml policy file when loading an mp3 file, ccPlayer will no longer crash. It will go ahead and play back the mp3 file but will not display metadata, such as the title of the audio.
Bug fixes
The following bugs were fixed:- The mp3 playback no longer waits for the file to be fully loaded before starting playback.
- The play button now appears when the end of the media is reached and ccMediaRewind is set to false.
- Shortcut-key recognition will not be re-enabled after controls are loaded when disableShortcutKeys() is run prior to loading the controls.
- Disabled a background graphic in the screen-reader instructions that was being found in inspect32, but not read by JAWS.
- Added trace messages to indicate when a media file or a media streaming server cannot be found.
v2.0.2
Scrub bar button bug fix
PLEASE NOTE: THIS FIX BREAKS CUSTOMIZED CONTROLS USED WITH THE PREVIOUS VERSION OF CCPLAYERAS3 (VERSION 2.0.1).This fix impacts all controls used with ccPlayerAS3. In order to ensure the forward and reverse buttons which may be embedded inside the scrub bar button (see Special scrub bar accessibility feature) are read by screen-reading software, it is necessary to add an additional button inside. This is necessary for all controls, even if the forward and reverse buttons are not included.
All of the controls, which are included in the package for this version of ccPlayerAS3, have been modified with the new object that is needed for the scrub bar button to work. In order to fix custom controls used with the previous version of ccPlayerAS3 (version 2.0.1), see Creating ccPlayer Customized Controls, Scrub bar.
Video playback display size changed
This version of the player changes the way the video size is determined, giving priority to the ccMediaWidth and ccMediaHeight parameters. In the previous versions (1.0.1 and 2.0.1) of ccPlayerAS3, if the video height was smaller than the height given by ccMediaHeight, the height of the player was reduced when the video was loaded. In this version, if the video is smaller than the dimensions given, the video will be centered in the media display area.ccScaleVideo parameter
The ccScaleVideo has been added to identify whether the video should be scaled to fit the dimensions of the values given in the ccMediaWidth and ccMediaHeight parameters. When the value of this parameter is true and the video size is different than what was specified in the above parameters, the video will either shrink or expand to fit the area, maintaining the aspect ratio of the video.Video remains in fullscreen view when playback is completed
In prior versions of ccPlayerAS3, if the user had selected fullscreen view, the view would default to normal at the end of the video. With this version, the player remains in fullscreen view. This allows for seamless fullscreen playback, when ccPlayerAS3 is embedded within another swf and multiple videos are played consecutively.New methods added for embedding ccPlayerAS3 in another swf
The following methods have been added to the player for use when it is embedded in another swf:- setNewMediaSize(width, height) – used to change the size of the media display area.
- setStreamingServer(server) – used to identify the streaming server, when video is being streamed from a Flash media server.
- activateRollupCaptionDisplay(lines) – used to switch the caption display from pop-on to roll-up.
- activatePoponCaptionDisplay() – used to switch the caption display from roll-up to pop-on.
Bug fixes
The following bugs were fixed:- Scrub bar button no longer moves past the end of the scrub bar area.
- The over state of a custom poster image button no longer flashes when ccPlayerAS3 is loaded.
- The player no longer throws an error if the customized controls do not contain the timeArea movieclip and the view is switched to fullscreen.
- The player no longer stops playback when jumpToTimeSeconds() is used to try to jump to a time in the video that is not currently loaded.
- Modified the initial playback of video streamed from a media server to ensure the onMetaData event is triggered.
v2.0.1
MP3 audio playback
This version of the player will playback mp3 audio files, along with Flash video (flv) and H.264 (mp4). Using the ccAudioImage parameter, an image can be specific which is displayed in the media area.Changes in some parameter names
Any parameters with the word “Video” have been updated to “Media”, which reflects that both video and audio content can be played through the player. Legacy parameters with the "Video" name will continue to be recognized in this version.Streaming parameters change
In order to separate the streaming name from the full url to streaming content, ccMediaStream is used to indicate the stream, while ccMediaName is used to identify the path to media file.Base color setting
The color of the windows, tooltips, and progress bar can be changed using the ccBaseColor parameter.Customized controls
An external swf can be imported with customized controls for the player. The new parameter is ccPlayerControls. Due the way the customized controls are implemented, all of the accessibility features of the player are maintained. It is also possible to use ccPlayer without controls; however, users will no longer be able to access the keyboard shortcuts.Special accessibility features for the scrub bar
ccPlayer has added two accessibility features that help keyboard and screen-reader users scrub or jump to various points in the media. When the focus is on the scrub bar button, by tabbing to it, the keyboard user can press the comma key (,) to scrub backwards in the media and the period key (.) to scrub forwards in the media.When customized controls are used, the forward and reverse buttons can be incorporated into the scrub bar, so they are not visible unless the user has tabbed to the scrub bar button. This is useful in situations where there may not be enough room in the controls to house the regular forward and reverse buttons.
Accessible forward and reverse buttons included in scrub bar button
When using custom controls, it might be necessary to minimize the number of buttons in the control area. However, the forward and reverse buttons are needed for keyboard and screen-reader users, who are not able to use drag feature of the scrub bar. Instead, these buttons can be placed inside the scrub bar button so they become available only when the scrub bar button has focus; otherwise, they are hidden. See Creating ccPlayer Customized Controls for more information.Time-remaining option added to customized controls
Customize controls now have the option of displaying any combination of three time properties: time remaining, current time and media duration.Dimensions are flexible
In the previous version of the player, only the height of the player was flexible. In this version both the height and width are flexible. The height of the player is determined by the height of the media being displayed, plus the caption area (when captions are provided) and the control area. The width of the player is either the width of the media or the width of the controls, whichever is larger. If the control area width is smaller than the media, the controls are centered and the control area background is expanded to reach the edges.Media is not loaded until play is selected or media is set to autostart
In order to eliminate unnecessary server requests, when ccPlayer is not set to autostart, the media is no longer loaded until play is started by the user.Fullscreen view modified
The layout of the fullscreen view has been modified so the media has more room to fit in the monitor's display. The captions continue to appear over the bottom of the media. If there is room for the controls underneath the media, they are placed there. If the media fills the bottom of the screen, the controls slide up from the bottom when they are needed. When this happens, the caption area is also raised so the controls do not appear on top of the captions.Fullscreen controls disappear when inactive
In the fullscreen view, the controls fade from view after a period of inactivity. When the mouse is moved (for some browsers and earlier versions of Flash Player, a mouse click is needed) the controls fade back into view. If the media fills the bottom of the screen, the controls slide up and down as they fade in and out of view.Can be embedded in another swf
This version of the player can be embedded and played inside other swfs.Embedded ccPlayer can be modified on the fly
New public methods have been included for starting new media and changing the controls on the fly, so the player can be used as the root media player in a chapterized Flash-based media environment. To assist with playlist playback, ccPlayer provides an event that is broadcast when the current media has completed playing.Maintains fullscreen view when embedded in a swf
When ccPlayer switches to fullscreen view while it is embedded inside another swf, it determines where it is in the hierarchy of all the possible parent holders and adjusts its position to maintain the full media view.Clickable scrub bar
Users can now click on any area of the scrub bar and have the media jump to that position in time. If the media has not loaded to that point, nothing happens.Rewind options
The ccMediaRewind parameter has been added to control whether the media should be returned to the beginning once playback is complete (true).Controls blocked
The controls can be blocked using the ccBlockControls, so they are visible with a translucent covering but are inactive. This parameter is helpful when ccPlayer is included in another swf which controls a playlist.v1.0.1
Conversion to ActionScript 3
This is the first version of the CCforFlash component built in AS3.
Synchronization
CCforFlashAS3 can still be synchronized to the Netstream Object, as well as the timeline of a MovieClip or SWF. The only video component CCforFlash can be synchronized to is the AS3 version of the FLVPlayback component.
Modified Search
The search feature has been modified, so terms can be found across multiple captions.
Embedded captions and roll-up display
CCforFlashAS3 allows for captions embedded in the FLV video file to be displayed as roll-up captions.
Roll-up display indication in DFXP metadata
Roll-up caption display can be indicated in the metadata of the DFXP caption file:
<metadata>
<ttm:displayMethod>rollup</ttm:displayMethod>
</metadata>
The metadata namespace will also need to be included in the file:
xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata"
Manual Mode
CCforFlashAS3 can be run in a manual mode. A timecode is given to the CCforFlashAS3 instance and the caption corresponding to that timecode is displayed. This could be used in situations where the object being synchronized to is not accessible to the component.
Height and width values
Height and width selections are no longer made via the Component Inspector. All size settings can be made in the properties inspector or via setSize(width, height) at run-time.
Additional color names
CCforFlashAS3 recognizes the X11 colors accepted by browsers following the HTML and CSS standards.
Property and method modifications
Some properties and methods have been changed from those found in the original AS2 version of CCforFlash. Please refer to the CCforFlashAS3 help pages for more information.
Bug Fix - component breaks when two components are placed in separate SWFs that have been loaded
CCforFlashAS3 can be placed in any number of SWFs or MovieClips without breaking.
Bug Fix - sample text appears briefly before being cleared
The sample text is no longer displayed at run-time.
Bug Fix - Extraneous linebreaks
Fixed bug where extraneous line breaks and returns in caption text were displayed. They are now correctly ignored.
Known Issue - Sound Objects and SoundChannel Objects
In AS3, timecodes from sound objects, such as MP3s, are retrieved from the associated SoundChannel object. Unfortunately, problems occured trying to maintain synchronization with this type of object as it was implemented in the component. For now, synchronization with this SoundChannel objects has been removed.
Return to CC for Flash home page