|
|
 |
EMBEDDING REAL AUDIO FILES IN HTML BASED SITES
Three years ago AudioLink developed a way to embed speech quality audio in webpages that was compatable with all browsers as well as the Macintosh. It also worked with AOL. Although we are currently using audio-only Flash files, which use MP3 audio, we do feel that the RealAudio codecs are superior for speech applications. MP3 was not developed for speech, but for music, and does introduce some phasing anomalies at bitrates as low as 24kbps. The Real codec we used was extremely small, (6.5kbps.) You can hear this in action in the old AudioLink site here.
As we are still doing with Flash the secret of it's cross platform compatability was in the use of a hidden frame. We load the RealPlug-in into this frame with a custom HTML document that assures playback on Netscape and Explorer, both Macs and Windows. If your site already uses frames you would add an audio frame with a size of 1 pixel to your frameset. If your site doesn't use frames you would create a frameset and place your entire site into the Content Frame, and load your audio instructions into the invisible Audio Frame.
You can initiate audio playback on page load, on user click, or via other actions. To play an audio file, your HTML code simply loads a new document into the hidden frame. This document contains the URL of the .RPM file which contains the URL of the .RM file. Sounds trickier than it is.
In the interest of being fully compatible with the most number of users, we have limited our capabilities to autostart. What we do is embed the RealPlug-In into the hidden frame and autostart the audio on page (frame) load.
Unfortunately the plugin is not scriptable from all platforms. JavaScript and/or ActiveX can only talk to (control) the plugin on the Windows platform. The plugin is not scriptable on the Macintosh platform. To simulate control of the plugin (audio) we hide the Real Audio in the hidden frame and change the HTML document in the hidden frame based on user actions in the visible frame(s.)
To create a Stop Audio button load a blank HTML document into the hidden frame - this will silence the currently playing audio.
RPM files and RM files
An .rpm file is a text file containing the URL of an .rm (audio) file to be streamed. On a Macintosh you must use a program such as FileTyper or ResEdit to make the file Type PNRA and Creator PNst. If you create the .rpm file on a Windows machine the extension is all that is necessary.
RPM files cannot use relative URL's and must contain the full address of the .rm file that you wish to stream.
Within the .rpm file use the http:// prefix to the URL, not the rtsp:// prefix. We are not using the RealServer software, which degrades performance.
The .rm files are the audio files. They are encoded at 6.5Kbps. At this bitrate they take less than 1 kilobyte per second of audio.
|
|
 |
|