Captioning for RealPlayer
Getting RealPlayer Content on the Web
Article Contents
- Page 1: Creating a RealText File
- Page 2: Adding Captions to RealPlayer
- Current page: Page 3: Getting RealPlayer Content on the Web
Linking to RealPlayer Content
When possible, RealPlayer content should be opened in the RealPlayer application, rather than embedding it within a web page. Embedded content is not keyboard accessible and is skipped over by most assistive devices. Unfortunately, you can't link directly to your SMIL file, because the .smil or .smi file extension can be set to be opened by Windows Media Player, Quicktime, or some other application when accessed on the web. It is best to link to a RAM file. A RAM file contains the address of the media files or SMIL files that we want RealPlayer to open. RAM files will always be opened by RealPlayer.
RAM files are simple to create. Open a text editor and type the address of the file you want to open on the first line. If it is a file on your web server, it might be something like
http://www.webserver.com/movies/mymovie.rm
If your file uses captions or you want to use a SMIL file, specify the path to your .smil file:
http://www.webserver.com/myfile.smil
If you want to play multiple files in a sequence, place the references to the files each on their own line.
When you're done, save the file with the .ram file extension. Place it on your web server and create a link to it, just as you would create a link to another web page. When the user clicks on the link, RealPlayer opens the RAM file, reads the references to the files you want to open, then opens and plays them.
Open the sample clip using a RAM file
If you have access to a newer version of RealServer, the RAM file can be created automatically. You just create a link to your file on the web server, but add the ramgen directory name before the filename, like:
http://realserver.yourdomain.com/ramgen/myfile.rm
or
http://realserver.yourdomain.com/ramgen/mysmilfile.smil
Embedding RealPlayer
Update
The RealPlayer plugin no longer seems to support the direct embedding of .smil files. To fix this, create a .ram file that references the .smil file, as documented above, then set the object and embed tag to open this .ram file.
When using SMIL, embedding your RealPlayer content is easy. You just tell your browser to open the .ram file which references your .smil file, which will in turn display your video and caption clips. Embedding involves the object and embed tags.
<object id="media"
classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
height="300" width="320">
<param name="controls" value="ImageWindow">
<param name="console" value="Clip1">
<param name="autostart" value="true">
<param name="src" value="sample.ram">
<embed src="sample.ram" console="Clip1"
controls="ImageWindow" height=300 width=320
type="audio/x-pn-realaudio-plugin" autostart=true>
</embed>
</object>
See sample page with embedded RealPlayer
Notice that the video above does not have any controls to pause, play, control volume etc. To add the controls, we need to add a second set of object and embed tags:
<object id="media"
classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA"
width="320" height="100">
<param name="src" value="sample.ram">
<param name="console" value="Clip1">
<param name="controls" value="All">
<param name="AutoStart" value="TRUE">
<embed controls="All" console="Clip1"
type="audio/x-pn-realaudio-plugin" src="sample.ram"
width="320" height="100" autostart="true">
</embed>
</object>
See embedded RealPlayer with controls added
In order for the controls to control the previous media clip, the id and console values must be the same. This allows the controls and the video to communicate back and forth. It also allows the controls and video to be anywhere within a page. They no longer have to be connected.
There are many possibilities for controls. Here is a list of controls and the height and width they should be assigned. ControlPanel and All may be assigned smaller dimensions and RealPlayer will only display the controls that will fit within the dimensions specified by leaving out controls that are least important first.
| Name | Value | Recommended Size (in pixels) |
|---|---|---|
| Image Window | ImageWindow |
usually the same dimensions as your video clip. |
| Play | PlayOnlyButton |
26 x 26 |
| Play/Pause | PlayButton |
44 x 26 |
| Pause | PauseButton |
26 x 26 |
| Stop | StopButton |
26 x 26 |
| Rewind | RWCtrl |
26 x 26 |
| Fast Forward | FFCtrl |
26 x 26 |
| Mute | MuteCtrl |
26 x 26 |
| Mute and Volume Control | MuteVolume |
26 x 88 |
| Volume Control Slider | VolumeSlider |
26 x 65 |
| Position Control Slider | PositionSlider |
120 x 26 |
| Transport Controls and Position Slider | ControlPanel |
350 x 36 |
| Basic Real Player Panel | All |
375 x 100 |