Skip to main content
Known Participant
March 24, 2011
Question

FMS, Flex, VOD, RTMP videoDisplay to find how many seconds of video are already loaded

  • March 24, 2011
  • 1 reply
  • 1535 views

Good day!

I can get which part of file in bytes is loaded using videoDisplay component for RTMP protocol for VOD, I can get the current playing position using videoDisplay.playheadTime. But I want to know how many seconds of video are already loaded (not the length of bufferTime, which remains constant). i used videoDisplay.bytesLoaded when using RTMP it returns nothing , if we uses HTTP it displays number of bytes loaded

The loaded size in bytes is not directly proportional to running time of the video, and while using rtmp im unable to get bytesLoaded too, how i can calculated the Video already loaded.

Any help is really appriciated!

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    April 5, 2011

    videoDisplay.bytesLoaded does not make sense for RTMP Streams as there is nothing which is loaded at client's end, its pure streaming. It works for http as its progressive download.

    In order to find time of video, i would suggest using Video Object and then attaching netstream to it and get time information from netstream.

    Probably you can post query on Flex forums to ask them how can you get access to underlying netstream using VideoDisplay object.

    Known Participant
    April 7, 2011

    I have tried using netstream  there also im unable to get like youtube buffered process.Please could u give me the example like, when we seeing the youtube video it shows how much downloaded and where is out play head now. how we should do that i am new to flex so could u give me a example for that?

    Participating Frequently
    April 11, 2011

    If i am not mistaken Youtube does not do pure streaming. Thier approach is little different and more towards progessive download as gets data downloaded to disk in temporarly file. In pure streaming you won't get whole buffer like how you get in youtube. Like i suggested post of Flex forum to see how can you do that getting handle of netstream and knowing netstream.time to atleast know where is your playhead.