Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Media Server

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 07-17-2003, 12:45 PM   #1
circumflex
Registered User
 
Join Date: Jul 2003
Location: Berlin
Posts: 7
Default server stream

Hi!

I set up a stream object on the server using:
ActionScript Code:
application.myStream = Stream.get("foo"); if (application.myStream){     application.myStream.play("sample_video"); }

Now i have no idea how to access the stream at the client side.
I understand the NetStream object opens a own streaming connection... right?
With NetStream I can do that:
ActionScript Code:
nc = new NetConnection(); nc.onStatus = function(info) {     startStreamSubscribe(); }; startStreamSubscribe = function () {     sub_ns = new NetStream(nc);     sub_ns.setBufferTime(20);     my_video.attachVideo(sub_ns);     sub_ns.play("sample_video"); }; nc.connect("rtmp://server/app_test");

But when a new user connect to the app he should not see the video from the beginning! So i have to set up a stream that constantly streams from the server again and again...

Puhhh, it's heavy stuff for an autodidact...

Regands

circumflex
circumflex is offline   Reply With Quote
Old 07-19-2003, 02:04 PM   #2
circumflex
Registered User
 
Join Date: Jul 2003
Location: Berlin
Posts: 7
Default

Here it is...

On server side i started a stream with the video "sample_video.flv":

ActionScript Code:
application.onAppStart = function() {     application.videoStream = Stream.get("my_video");     if (application.videoStream) {         application.videoStream.play("sample_video", 0, -1);     } };


Now i can see the stream:

ActionScript Code:
nc = new NetConnection(); nc.onStatus = function(info) {     if (info.code == "NetConnection.Connect.Success") {         startStreamSubscribe();     } else {         trace("connection failed");     } }; startStreamSubscribe = function () {     sub_ns = new NetStream(nc);     sub_ns.setBufferTime(10);     _root.container.attachVideo(sub_ns);     sub_ns.play("my_video"); }; nc.connect("rtmp://server/app");

I forgot to place an emedded video on the stage and name it "container".
That's it...

The stream does not start from it's beginning when i press browsers reload button. cool.

The next goal is to loop the stream!!

Anybody an idea?


greetings

circumflex
circumflex is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.
You Rated this Thread: