Skip to main content
Participant
August 5, 2008
Question

Live Streaming incomplete

  • August 5, 2008
  • 2 replies
  • 383 views
Hi,

Going through couple of tutorials on the adobe site, i wanted to try out how the live streaming works.
So i setup the FMS 3 on the system which also hosts my web server (IIS).
I setup the FME 2.5 on my system(with attached web cam).
Later i started the live streaming by providing the FMS URL: "rtmp://ip_address/live/instance1" and with stream name as "myFirstStream".
I was able to confirm that my FMS is able to receive the stream by verifying the FMS Admin console on the server.

Second part:
i created a "myStream.fla" having the FLV playback object on the timeline and providing "livestream" as its instance name. i did not provide any source/contentpath in the properties window for the FLV playback object.
Then i created "streamaction.as" file and included that in the action script window in timeline2-frame1 by using the following code syntax: include "streamaction.as"

in "streamaction.as" file in included the following 3 lines of code:

livestream.width=320;
livestream.height=240;
livesteam.load("rtmp://ip_address/live/instance1/myFirstStream", true);

"true" in the above line indicates "isLive" value.

i created a "test.html" page in which i used the <object> and <embed> tags to embed the "myStream.swf" file

Issue 1: But when i opened the "test.html" in my browser, no streaming was visible except the place holder/blank flash object in the page, eventhough the FME and FMS are displaying the streaming from my webcam.

i even modifed the code as follows:
livestream.width=320;
livestream.height=240;
//livesteam.load("rtmp://ip_address/live/instance1/myFirstStream", true);
livesteam.contentpath = "rtmp://ip_address/live/instance1/myFirstStream";
livesteam.isLive = true;

Also can anyone suggest how to access the flash variable so that i can pass the URL value from my web page itself to the flash object. I had come accross the following way.. could this be the right approach (read FlashVars in the tags below)? ref: http://www.permadi.com/tutorial/flashVars/index.html

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=" http://macromedia.com/cabs/swflash.cab#version=9,0,0,0"
ID=flaMovie WIDTH=250 HEIGHT=250>
<PARAM NAME=movie VALUE="myStream.swf">
<PARAM NAME=FlashVars VALUE="streamName=myFirstStream">
<PARAM NAME=quality VALUE=medium>
<PARAM NAME=bgcolor VALUE=#99CC33>
<EMBED src="myStream.swf"
FlashVars="streamName=myFirstStream"
bgcolor=#99CC33 WIDTH=250 HEIGHT=250
TYPE="application/x-shockwave-flash">
</EMBED>
</OBJECT>



and in "streamaction.as" file change line 3 to:

livesteam.load("rtmp://ip_address/live/instance1/"+_root.streamName+"", true);
will this work?

TIA,
Mohith
    This topic is closed to new replies. Start a new post to keep the conversation going.

    2 replies

    August 5, 2008
    Please refer to the sample livetest.swf +html client that comes with FMS3 in inside your FMSinstall folder samples/aplplications/live/. It is a working example of FLVPlayback component.

    Participant
    August 13, 2008
    Finally figured out what was incorrect in my code. Here is the working code (AS3):
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    myVideo.autoPlay = false;
    myVideo.isLive = true;
    myVideo.source = "rtmp://ip_address/live/instance1/"+ paramObj.streamName;
    myVideo.autoPlay = true;

    solution: isLive has to be set to true before setting the source of the FLVcomponent