81
6
CHAPTER 6
Application Development
Tips and Tricks
This chapter points out some useful information about application development that is
specific to Macromedia Flash Media Server. It includes general sections on application design
and coding conventions. Read this chapter after you are familiar with the concepts described
in Chapters 1 and 2.
About file types and paths
When you use methods that record audio, video, or data streams (for example,
NetStream.publish()
), Flash Media Server creates a file
—filename
.flv—where
filename
is
the string that was passed to the method that recorded the stream. These files are the recorded
stream and its associated index file. For example, if you issue the command
NetStream.publish(
"
me
"
,
"
record
"
)
, a file named me.flv is created.
When Flash Media Server generates stream files for an application, it creates a streams
directory with application-instance subdirectories. For example, if the application instance
ChatApp/MondayChat
records a stream named
chat
, the chat.flv file is stored in the following
location: /applications/ChatApp/streams/MondayChat. If you run an instance of ChatApp
called TuesdayChat, its files are stored in /applications/ChatApp/streams/TuesdayChat.
To play back an FLV file that was created by a specialized video application, such as Sorenson
Squeeze or On2, place it in the directory where the Flash Media Server expects to find it—
that is, a subdirectory of a /streams directory as discussed in the preceding paragraph. You can
create subdirectories to further organize FLV files, as long as the subdirectories are in the
correct application-instance subdirectory. For example, within /streams/TuesdayChat, you
could create additional subdirectories /streams/TuesdayChat/morning and streams/
TuesdayChat/afternoon and store FLV files in those subdirectories.
If you want to play back MP3 audio files, see
Chapter 4, “Working With Media Files.”
Содержание FLASH MEDIA SERVER 2-DEVELOPING MEDIA
Страница 1: ...Developing Media Applications ...
Страница 6: ...6 ...
Страница 10: ...10 About This Manual ...
Страница 36: ...36 Flash Media Server Architecture ...
Страница 80: ...80 Debugging and Monitoring Applications ...
Страница 106: ...106 Application Development Tips and Tricks ...
Страница 114: ...114 ...