I'm using a NetStream class to play video using Video class or stage video , there is no seek bar to backward or forward video , i add seek bar to video but the seek function not work exactly , it give me a wrong time of seeking . ns.seek(mySeekTime)
i wondered if it possible to make my own seek bar with exact seeking , i get the video from server , is server affect on seeking for video ?
private function onClick(event:MouseEvent):void
{
if (event.currentTarget is Group)
{
var myGroup:Group = event.currentTarget as Group;
if ( myGroup.mouseX >= 100)
{
mouseClickedXPos = myGroup.mouseX;
ns.inBufferSeek = true;
var seekTime:Number = (mouseClickedXPos-100) * (totalTime/(controlBarControls.width-100));
ns.seek(seekTime);
myRect.graphics.clear();
myRect.graphics.beginFill(0xFF0000);
myRect.graphics.drawRect(controlBarControls.x+100,controlBarControls.y,mouseClickedXPos-100, rect.height);
}
}
}
Here seek bar is myRect shape i draw it after Event.ENTER_FRAME .
problem : the time ns.time()
will not change to new time we updated by seek(seekTime)