Skip to main content
dfm_
Known Participant
May 20, 2007
Answered

progressive download -> stop buffering at X sec.

  • May 20, 2007
  • 3 replies
  • 518 views
Hello,
I have custom made flash video player, witch pays (.flv)s. I want to make something like trial of flash video clip. I have flash video clip (.flv) with time length of 30 sec. I want to buffer only to 10 sec. and whe 10th sec. is reatch to stop. So in my buffer memory will have only 1/3 of this (.flv). Is it possible to make? How?

P.S. sorry for my English isn't very good.
    This topic has been closed for replies.

    3 replies

    Correct answer
    May 21, 2007
    dfm_
    dfm_Author
    Known Participant
    May 21, 2007
    hello, 10x for RQ

    but in help I can't find about publish property of NetStream. Can give some more info.
    May 21, 2007
    DFM,
    An easy way to implement your timer is to use the playheadUpdate method of the FLVPlayback component like this...

    var listenerObject:Object = new Object();
    listenerObject.playheadUpdate = function(eventObject:Object):Void {
    // insert event-handling code here
    };
    my_FLVplybk.addEventListener("playheadUpdate", listenerObject);

    Another way would be to use NetStream.time on the publishing stream something liek this...

    my_ns.attachVideo(active_cam);
    my_ns.publish("SomeData", "live");
    //After 10 seconds, my_ns.time = 10.

    //You then stop publishing the stream.
    my_ns.publish(false);

    //10 seconds later, you publish on the same stream.
    my_ns.publish("SomeData", "live");
    //my_ns.time resets to 0.

    Regards,
    Shack