Hi,
If you want to start playing at 10 seconds you have to first, buffer your
video to 10 seconds. (or 15)
wait for your buffer to be full, then do your seek operation.
That is if you're doing it as a progressive download. If you stream using
FMS or something like it, FMS will automatically handle the pre-buffering
and notify you when it's ready.
bufferTime(15) //buffer the video to 15 seconds
//create your netStream blah blah
nc= //net connection, you know the drill
//bla blah blah
myNetStream_ns = new NetStream(nc)
//
myNetStream_ns.onStatus(infoObj:Object){
for (var prop in infoObject)
{
if (infoObject[prop] == "NetStream.Buffer.Full")
{
//buffer has enough data now seek
myNetStream_ns.seek(10)
}
if (infoObject[prop] == "NetStream.Buffer.Empty")
{
// you can handle loading issues here. if the buffer runs empty
means the progressive d/l is too slow.
}
if (infoObject[prop] == "NetStream.Play.Stop")
{
// know when it stops
}
}
}
also when you run the seek() call the invalid time return also gives you the
last valid time you can set up a handler to automatically seek to the last
valid time that way.
On 4/5/07, john robinson <[EMAIL PROTECTED]> wrote:
I'm not sure but I think the extra parameters only apply to streaming
video (aka, video from FMS). There's a lot more info here:
http://livedocs.adobe.com/fms/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm
I did a quick test with a local flv and couldn't get it to work, though
this bit of code did work (but ugly)...
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.play("MVI_2739.flv");
vid.attachVideo(ns);
ns.onMetaData = function(d) {
this.seek(10);
}
john
On Apr 5, 2007, at 9:12 AM, leolea wrote:
>
> I've read the docs and the livedocs, and I don't see a "ready" event.
>
> Does this mean that this last suggestion of yours won't work ?
>
> netStream.play(flvPath);
> netStream.seek(5);
>
>
>
>
> On 4/4/07 7:14 PM, "Steven Sacks | BLITZ" <[EMAIL PROTECTED]>
> wrote:
>
>> You have to wait for the ready event before you can seek. Read the
>> docs
>> and it will all come clear.
>> _______________________________________________
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com