dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: FLVplayer - clearing a streaming .flv

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Posts
    14

    FLVplayer - clearing a streaming .flv

    Hi guys,

    Does anyone know if it is possible to completely 'clear' an flv streaming into the FLVplayer component once it has begun streaming?

    I have tried setting the contentpath to "" and calling the stop() method too. Nothing works. I have a feeling that once you begin streaming a .flv you can't delete or clear it until its fully loaded, does this sound correct? Any clarification on this subject would be greatly appreciated as my searches through the forums have not yielded any results so far.

    Cheers,

    vreb

  2. #2
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I'm not really clear on your question. Are you really talking about "streaming" video or just video that is being progressively downloaded? The reason I ask is because streaming video is never "fully loaded", all though I'm not really sure what you mean by that.
    As for stopping this "fully loaded" action you are talking about, how would you like to do this? by clicking a button? or at a certain point in the video, or what?
    I'm not real familiar with the FLVPlayback component so I'm not sure if NetStream commands are available or not. In custom build video players using NetStream, try using close(); in something like this:
    Code:
    MyStream_ns.close();
    Lacking that, you might try something I use to stop audio files from continue to download even after you stop the music. And that is to have the player attempt to load a non-existing audio (or in this case video) file. When the action to load that non-existing file happens, the downloading of the currently playing file stop, the player attempts and fails to load the fake file, so player stops, all downloading stops.
    Maybe you adapt something like that to your application.
    Best wishes,
    Eye for Video

  3. #3
    Junior Member
    Join Date
    Oct 2007
    Posts
    14
    Thanks for taking the time to reply here, it is much appreciated. I have found that the only solution when using the FLVplayer component is to send the movie to a frame that no longer contains this component, then back again when you want to start loading another file.

    I don't think you can use any of the netstream methods either, but thanks anyway. I also tried setting the contentpath property to just "" and using the stop() method like you mentioned, but the sound portion of the original file still plays.

    In fact, from my tests there seem to be no apparent way to completely stop and clear the existing flv from the FLVplayer component at all once you have triggered the initial loading of the file. This may have something to do with the fact that the .flv file may need to completely finish streaming from the server before anything can be done etc.

    Anyway, for anyone else in the same boat. If you get this problem I would recommend sending the movie to a frame that no longer contains the component as this really does clear the content (obviously). Then just come back to the frame with the component on again when required.

    Thanks for the help and advice anyway though Eye for Video!

    vreb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center