London Escorts sunderland escorts www.asyabahis.org www.dumanbet.live www.pinbahiscasino.com sekabet.net www.olabahisgir.com maltcasino.net faffbet-giris.com www.asyabahisgo1.com www.dumanbetyenigiris.com www.pinbahisgo1.com sekabet-giris2.com www.olabahisgo.com www.maltcasino-giris.com www.faffbet.net betforward1.org betforward.mobi 1xbet-adres.com 1xbet4iran.com romabet1.com www.yasbet2.net 1xirani.com www.romabet.top 3btforward1.com 1xbet https://1xbet-farsi4.com سایت شرط بندی معتبر betforward
Array

RTMP Streaming

Must Read

Admin
Admin
Just post!

Real Time Messaging Protocol (RTMP) is a protocol using a streaming server such as Flash Media Server or a streaming service such as Influxis or Flash Media Server for Amazon Web Services.

Streaming uses a lot of data. Inform your users to use WiFi so that it is not too costly and guarantees the best possible quality experience.

RTMP server

Let’s use our RTMP server to stream an on-demand video. As in progressive downloading, streaming uses a Video, a NetConnection, and a NetStream object.

NetConnection connects to the streaming server. The protocol used is rtmp. Note the streamClient variable. You need it for callbacks; otherwise, you will get a runtime error:

[code]static const SERVER:String = “rtmp://SERVER_URI/vod/;
static const VIDEO_PATH:String = “/myVideo”;
video = new Video();
video.width = 480;
video.height = 320;
connection.addEventListener(NetStatusEvent.NET_STATUS, onNetEvent);
connection.connect(SERVER);
function netConnectionEvent(event:NetStatusEvent):void {
if (event.info.code == “NetConnection.Connect.Success”) {
var stream:NetStream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS, onStreamEvent);
var streamClient:Object = new Object();
streamClient.onMetaData = onMetaData;
stream.client = streamClient;
video.attachNetStream(stream);
stream.play(VIDEO_PATH);
addChild(video);
break;
}
}
function onStreamEvent(event:NetStatusEvent):void {}
function onMetaData(info:Object):void {}
function onBWDone():void {}[/code]

It is a good idea to add listeners for connection errors while debugging and to inform your audience in case of an issue:

[code]connection.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
connection.addEventListener
(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
connection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
function onIOError(event:IOErrorEvent):void {}
function onSecurityError(event:SecurityErrorEvent):void {}
function onASyncError(event:AsyncErrorEvent):void {}[/code]

Local Flash Media Server

You can install a local Flash Media Server to run and test your applications. Change the path to your local server. To ensure the video plays, turn off .swf verifications on the server:

[code]static const SERVER:String = “rtmp://localhost/vod/”;[/code]

Flash Media Server offers features to examine and monitor your video streams. The Quality of Service API, for instance, returns the user’s current bandwidth. You can extend the functionality of your video management by writing additional server code.

 

- Advertisement -

Latest News

Bentley Unveils New Flying Spur: A 771 bhp Hybrid Supercar with Four Doors

Bentley Motors is set to revolutionize the luxury car market with the launch of its new Flying Spur on...
- Advertisement -

More Articles Like This

- Advertisement -