• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

7.5. Streaming MP3 Audio

One of the additions to FlashCom 1.5 from the original 1.0 release is the capability to stream MP3 audio files from a FlashCom application. Now, you may be scratching your head, thinking, "Can't I already load MP3 files into the Flash Player with Sound.loadSound( )?" And you're right. However, loadSound( ) operates with HTTP, and so requires that the MP3 files (or source) are accessible from a web server. Also, it's possible for someone to discover this source and access the MP3 files directly, without the use of Flash Player. With FlashCom, you can protect your MP3 sources and be fairly confident that the right to access those files is managed. Just like FLV files, MP3 files streamed with FlashCom over RTMP (or HTTP tunneling) are never cached as whole files on the end user's computer. The MP3 data is stored only temporarily as chunks within the Flash Player's buffer. After the sound has played, there's nothing left over on the user's machine. Because of this security feature, you may decide to use FlashCom Server as your MP3 streaming server as well as your video streaming server.

For a review of stream basics and an introduction to MP3 streaming, including use of the NetStream and Stream classes, refer to Chapter 5.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint