
Using RealMedia content in Director
263
RealMedia stream playback
In Director, RealMedia playback occurs at the cast member level, not the sprite level. Therefore, if
you have two sprites of a cast member, and you apply a method or property to one of the sprites,
the method applies to both sprites. For example, if you select the Display Real Logo check box (or
call the corresponding
displayRealLogo
script property in a script) for one of the sprites, the
Display Real Logo check box is automatically selected for both of the sprites, and the
RealNetworks logo is displayed when either sprite plays. This is true for all methods and
properties, not just the
displayRealLogo
property.
If your movie contains more than one RealMedia sprite (not playing at the same time) that
reference the same cast member, you may want to create two cast members referencing the same
URL, so that the sprites can be controlled independently. Sprites that reference the same cast
member are subject to the methods and properties of the member.
Streaming
Streaming is the most efficient and user-friendly method of downloading, viewing, and listening
to video and audio content on the Internet. Users can begin viewing content as soon as a small
portion (usually a few seconds) of the file has downloaded. As the stream plays, the rest of the
stream continues to download in the background.
If you understand how the streaming process works in Director, and for RealMedia cast members
in particular, you can minimize the amount of time users must wait before your content begins to
play in the browser.
The Shockwave Player first downloads the Score information, scripts, and information about the
size and shape of each cast member, and then downloads the media in the cast members as they
are played in the movie. When a RealMedia cast member begins to play, the streaming process
begins and cycles through the various states. If you are viewing content in the RealMedia viewer,
the
mediaStatus
property value that corresponds to the state in the streaming process is
displayed in the status bar. For more information about this property, see the Scripting Reference
topics in the Director Help Panel.
During the seeking or buffering state (
mediaStatus
#buffering
), RealMedia cast members are
downloading into a buffer that holds the portion of the stream that is about to play. This initial
loading of the buffer is what causes the delay between the call to the
play
method (in the Score or
user initiated) and the actual playing of the stream. Once the stream begins to play, the
information in the buffer is continually updated with the next portion of the stream to be played,
and the stream plays without interruption. For more information, see
percentBuffered
in the
Scripting Reference topics in the Director Help Panel.
When using Lingo or JavaScript syntax with RealMedia cast members, you need to know which
streaming state the cast member has reached, or script errors can result. For complete information
about the order of the states in the streaming process and the impact on RealMedia cast members,
see
state (RealMedia)
and
mediaStatus
in the Scripting Reference topics in the Director
Help Panel.
Streaming of RealMedia cast members is handled by RealPlayer, not the Shockwave Player. Since
the streaming of RealMedia cast members is independent of the streaming functionality of
Director, RealMedia cast members are not placed in the Director cache, and NetLingo does not
apply to RealMedia cast members.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...