MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manual do Utilizador Página 157

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 172
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 156
154
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Specify the format in the name parameter you pass to the Stream.get() method. To publish in FLV format, specify
only the stream name, for example,
Stream.get("footballGame"). To publish in F4V format, prefix the stream
name with
mp4:. You can optionally specify the file extension, for example, the following code is all legal:
Stream.get("mp4:footballGame.f4v")
Stream.get("mp4:footballGame.mp4")
Stream.get("mp4:footballGame")
F4V files behave differently than FLV files. To create a file with a file extension, you must specify a file extension. If
you don’t specify a file extension, the file created will not have a file extension.
To record one stream, create a stream with that format when you call Stream.get(). For example, if you want to
record the stream “myHomeMovie.mp4”, use code like the following:
s = Stream.get("mp4:streamName.mp4");
if(s){
s.record();
s.play("mp4:myHomeMovie.mp4");
}
To record in F4F format for HTTP Dynamic Streaming, do the following:
s = Stream.get("f4f:streamName.f4f");
if(s){
s.record();
s.play("mp4:myHomeMovie.mp4");
}
When you add streams to the end of an existing file to make a playlist, you might add streams with different settings
and formats. If you record a file in FLV format, the server records the streams encoded with On2 VP6 and ignores
streams encoded with H.264. If you record a file in F4V format, you can append any type of content to the stream,
including FLV, MP3, MP4, F4V, and live streams.
Note: To play or edit F4V files recorded by Adobe Media Server in other tools, use the Adobe Media Server F4V Post
Processor tool. The tool is available at
www.adobe.com/go/ams_tools.
Availability
Flash Communication Server 1
Parameters
name A string specifying the name of a Stream object.
Returns
A Stream object if the call is successful; otherwise, null.
Examples
The following example publishes and records a video in F4V format. The stream contains 2 videos, one in FLV format,
and one in MP4 format.
var s=Stream.get("mp4:streamName.f4v");
if(s) {
s.record();
s.play("sample",-2,-1);
s.play("mp4:sample_mp4.mp4",-2,-1,false);
}
Vista de página 156
1 2 ... 152 153 154 155 156 157 158 159 160 161 162 ... 171 172

Comentários a estes Manuais

Sem comentários