Adobe 65029121 Developer's Guide - Page 17

Creating clients for streaming services

Page 17 highlights

ADOBE FLASH MEDIA SERVER 14 Developer Guide 3 Open the Application.xml file in the RootInstall/applications/vod2 folder and add VOD2_DIR to the virtual directory entry list: /;${VOD2_DIR}. 4 Restart Adobe Flash Media Server. 5 Place recorded media files into the folder you specified in the fms.ini file (in this example, C:\Program Files\Adobe\Flash Media Server 3\applications\vod2\media). The media files are now accessible from the URL rtmp://flashmediaserver/vod2/filename. Note: You do not have to specify the media subdirectory in the URL; the media directory is specified in the path you set in the fms.ini file. Disable vod services ❖ Move any vod service folders you want to disable out of the applications folder. Creating clients for streaming services Creating client applications Start with the provided sample client code (RootInstall/samples/applications/live and RootInstall/samples/applications/vod) and modify it as desired. Clients for the vod and live services can use any Flash Player features except the following: • Recording live streams (NetStream.publish("streamName", "record")). • Remote shared objects (SharedObject.getRemote()). Using the FLVPlayback component You can use the Flash 8 FLVPlayback component and the Flash CS3 FLVPlayback component as clients for the vod and live services. Set the contentPath parameter to the URL of the stream and, if you're connecting to the live service, set the isLive parameter to true. Connecting to a streaming service The streaming services expect the incoming URI to be in the following format: rtmp://hostName/serviceName/instanceName/[formatType:]fileOrStreamName hostName The Flash Media Server domain name. serviceName Either live or vod. instanceName If the client is connecting to the default instance, you can either omit the instance name or use _definst_. If the client is connecting to an instance you have created, such as room1, use that name. formatType One of the supported file formats, flv:, mp3: or mp4:. The default format if unspecified is flv:. fileOrStreamName Either a file name (for example, my_video.mp4) or a pathname (for example, subdir/subdir2/my_video.mp4). If the file is an FLV or MP3 file, you do not need to specify the file format. If the file is an MP4 file, you must specify the file format, for example, rtmp://www.examplemediaserver.com/vod/ClassicFilms/mp4:AnOldMovie.mp4.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66

ADOBE FLASH MEDIA SERVER
Developer Guide
14
3
Open the Application.xml file in the
RootInstall
/applications/vod2 folder and add
VOD2_DIR
to the virtual
directory entry list:
<Streams>/;${VOD2_DIR}</Streams>
.
4
Restart Adobe Flash Media Server.
5
Place recorded media files into the folder you specified in the fms.ini file (in this example,
C:\Program
Files\Adobe\Flash Media Server 3\applications\vod2\media
).
The media files are now accessible from the URL
rtmp://
flashmediaserver
/vod2/
filename
.
Note:
You do not have to specify the media subdirectory in the URL; the media directory is specified in the path you
set in the fms.ini file.
Disable vod services
Move any vod service folders you want to disable out of the applications folder.
Creating clients for streaming services
Creating client applications
Start with the provided sample client code (
RootInstall
/samples/applications/live and
RootInstall
/samples/applica-
tions/vod) and modify it as desired.
Clients for the vod and live services can use any Flash Player features except the following:
Recording live streams (
NetStream.publish("streamName", "record")
).
Remote shared objects (
SharedObject.getRemote()
).
Using the FLVPlayback component
You can use the Flash 8 FLVPlayback component and the Flash CS3 FLVPlayback component as clients for the vod
and live services. Set the
contentPath
parameter to the URL of the stream and, if you’re connecting to the live
service, set the
isLive
parameter to
true
.
Connecting to a streaming service
The streaming services expect the incoming URI to be in the following format:
rtmp://hostName/serviceName/instanceName/[formatType:]fileOrStreamName
hostName
The Flash Media Server domain name.
serviceName
Either
live
or
vod
.
instanceName
If the client is connecting to the default instance, you can either omit the instance name or use
_definst_
. If the client is connecting to an instance you have created, such as
room1
, use that name.
formatType
One of the supported file formats,
flv:
,
mp3:
or
mp4:
. The default format if unspecified is
flv:
.
fileOrStreamName
Either a file name (for example, my_video.mp4) or a pathname (for example,
subdir/subdir2/my_video.mp4). If the file is an FLV or MP3 file, you do not need to specify the file format. If the file
is an MP4 file, you must specify the file format, for example,
rtmp://www.examplemediaserver.com/vod/ClassicFilms/mp4:AnOldMovie.mp4
.