It seems its just for flex code using AMF3 i think as the oflaDemo 
doesnt do it, however its As2 code, i tried the flex example but it 
doesnt load the videos into the playlist, i added the same code like so 
but it still doesnt send the right metadata info, I require this to 
change the video container size when changing bitrates.

//changed my code to this still didnt work.

videoDisplay.attachNetStream(ns);
ns.close();
ns.play(this.videoFileName,0);

modelling this

function initNetStream()
{
    this.ns = new NetStream(this.nc);
    this.ns.onStatus = Delegate.create(this, this.nsOnStatus);
    this.ns.onMetaData = Delegate.create(this, this.onMetaData);
}

function playMovie(what) {
    this.videoContainer._width = vidWidth;
    this.videoContainer._height = vidHeight;
    stopVideo();
    initNetStream();
   
    ns.setBufferTime(5);
    hackThisBuffer(what);
    this.videoContainer.attachVideo(this.ns);
    ns.play(what);
   
}

my code, there is absolutely no difference, apart from i add 0 to play 
because then else it wont display streamnotfound errors.


private function changeBitrate(event:ProfileEvent):void
{
    chooser.visible = false;
    bitrateBtn..selected = false;
    profile.bitrate = event.bitrate;
    setBitrateStatus(event.bitrate);
    setFileName(episodeID, event.bitrate);
    stop(event);
    initStream();
    initVideo();
}

private function initStream():void
{
    ns = new Stream(nc);
    ns.client = this;
    ns.addEventListener(StreamEvent.BUFFERING, buffering);
    ns.addEventListener(StreamEvent.BUFFERING_COMPLETE, bufferingComplete);
    //ns.addEventListener(StreamEvent.PLAYBACK_RESET, buffering);

    ns.addEventListener(StreamEvent.PLAYBACK_START, playbackStart);
    ns.addEventListener(StreamEvent.PLAYBACK_STOPPED, playbackStopped);
    ns.addEventListener(StreamEvent.PLAYBACK_PAUSED, playbackPaused);
    ns.addEventListener(StreamEvent.PLAYBACK_UNPAUSED, playbackUnpaused);
    ns.addEventListener(StreamEvent.STREAMNOTFOUND, streamNotFound);
    ns.addEventListener(StreamEvent.SEEKING, onSeekComplete);
    ns.addEventListener(IOErrorEvent.IO_ERROR, netIOError);
    ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, netAyncError);
    ns.bufferTime = startBufferTime;

}

private function initVideo():void
{
    videoDisplay.attachNetStream(ns);
    playStream(videoFileName);
}
public function playStream(streamName:String):void
{
    //ns.close();
    ns.play(streamName);
    log.info("Playing stream: " + streamName);
}



Dan Rossi wrote:
> Hi are people still getting this problem ? It seems that the metadata 
> being sent when switching a stream within the same connection will send 
> the metadata from the first requested file. Maybe its an issue with the 
> second file not playing at 0 ? Ive even tried to close the stream and 
> the connection first and reconnect and the same thing ..
>
>
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>   


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to