Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-14-2005, 12:35 PM   #1
guliver
Registered User
 
Join Date: Nov 2005
Posts: 4
Default flash video stream stops inapropriate

hi everyone,

I've got following problem with streaming a flv.
The video starts, runs a few minutes and then stops, without giving any hint.

PHP Code:
ladeFlv = function(dateiName:String){
        
netConn = new NetConnection();
        
netConn.connect(null);
    
        var 
netStream:NetStream = new NetStream(netConn);
        
netStream.onStatus = function(infoObject) {
            
//trace("this="+this);
            
if (infoObject.code == "NetStream.Play.StreamNotFound") {
                
trace("No such stream.");
            }
            else if(
infoObject.code == "NetStream.Buffer.Full"){
                
_root.filmPreloader._alpha=0;
            }
            else if(
infoObject.code == "NetStream.Play.Stop"){
                
netStream.pause(false);//nicht wieder starten
                
this.stopFlv();
            }
            
            
trace("Status (NetStream)");
            
trace("Level: "+infoObject.level ", ");
            
trace("Code: "+infoObject.code ".");
            
trace("Buffer: " +netStream.bufferLength);
            
trace("BufferTime: " +netStream.bufferTime);
            
        }
        
_root.videoFenster.attachVideo(netStream);
        
netStream.setBufferTime(500);
        
netStream.play("./flv/"+dateiName);
    }

this.erste.onRelease = function(){
    
ladeFlv("tb0.flv");    

plz, if you have any idea.
guliver is offline   Reply With Quote
Old 11-14-2005, 01:20 PM   #2
you_rock
Senior Member
 
Join Date: Oct 2002
Posts: 240
Default

First, add the NetStream.Buffer.Empty to you netstream callback.

It seems that since, you are buffering 500 seconds, that the point in which it stops is when the buffer has run out and must continue to load again.

This will not fix the problem, but will at least find the issue.
you_rock is offline   Reply With Quote
Old 11-14-2005, 01:54 PM   #3
guliver
Registered User
 
Join Date: Nov 2005
Posts: 4
Default

thanx for your reply, I fixed it.
I've put the
PHP Code:
var netCo:NetConnection = new NetConnection();
netCo.connect(null);
var 
netStr:NetStream = new NetStream(netCo); 
on the _root of my fla. And changed the code like this:
PHP Code:
private function ladeFlv(dateiName:String){
    
_root.netStr.onStatus = function(infoObject) {
        if (
infoObject.code == "NetStream.Play.StreamNotFound") {
            ...
        }
    }

    
_root.videoFenster.attachVideo(_root.netStr);
    
_root.netStr.setBufferTime(5);
    
_root.netStr.play("./flv/"+dateiName);

I don't know why this works now, but it does...
anyhow I'm very interested to hear the reason,
if anyone knows?
guliver 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Communication Server (FCS) - Live Webcam Stream Over the Internet - How? andrewf Flash Media Server 12 02-17-2012 05:38 AM
Video in Flash iamshaun Other Flash General Questions 1 08-17-2005 09:14 AM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 11:13 AM
Flash MX Developers Exam VitiminJ General Chat 34 05-05-2004 01:27 PM


All times are GMT. The time now is 10:42 AM.

///
Follow actionscriptorg on Twitter

 


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