Добрый вечер!
Не могу разобраться с псевдо стримингом.

Код AS3:
package
{
import flash.display.MovieClip;
import flash.events.NetStatusEvent;
import flash.events.TimerEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.utils.Timer;
public class videocanvas extends MovieClip
{
public function videocanvas()
{
super();
_init();
}
/**
* Initialize the videocanvas
*/
private function _init():void{
//initialize variables
this._netConnection = new NetConnection();
this._netConnection.connect(null);
this._netStream = new NetStream(this._netConnection);
this._netStream.client = {};
this._netStream.client.onMetaData = onMetaDataHandler;
this._netStream.client.onCuePoint = onCuePointHandler;
this._netStream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
this._video = new Video();
this._video.attachNetStream(this._netStream);
this._video.smoothing = true;
this._netStream.bufferTime = 5;
this._netStream.play("http://localhost/xxx.flv");
this._video.width = this.width;
this._video.height = this.height;
this._video.x = -(this._video.width/2);
this._video.y = -(this._video.height/2);
this.addChild(this._video);
this.updateDisplay = new Timer(3,10);
this.updateDisplay.addEventListener(TimerEvent.TIMER,updateTic);
}
private function updateTic(event:TimerEvent){
}
/**
* Metadata callback
* */
public function onMetaDataHandler(metaInfo:Object){
this._netStream.play("http://localhost/xxx.flv?start=254389343");
}
public function onCuePointHandler(item:Object){
trace(1);
}
private function netStatusHandler(e:NetStatusEvent){
}
//variables section ============================================
//NetStream
private var _netStream:NetStream;
/*NetConnection*/
private var _netConnection:NetConnection;
/*The video variable*/
private var _video:Video;
/*Client variable*/
private var _stremClient:Object;
//timer
private var updateDisplay:Timer;
//meta object
private var videoMeta:Object;
}
}
В функции:

Код AS3:
public function onMetaDataHandler(metaInfo:Object){
this._netStream.play("http://localhost/xxx.flv?start=254389343");
}
в параметре
start указываю байт и все работает.
Вопрос - откуда взять этот байт?
Если вставляю туда произвольный байт, то ничего не воспроизводиться. Как мне расчитать нужные байты?
Этот байт я спарсил с longtail JWPlayer.