Skip to main content
miquael
Inspiring
July 10, 2009
Answered

NetStream BytesLoaded not registering with streaming?

  • July 10, 2009
  • 1 reply
  • 1220 views

I'm working with a custom made Flash video player using FMS (Wowza, actually).

The video is working, yet when I access the BytesLoaded and BytesTotal, I get 0 (zero) for each.  This even persists as the video is loading and playing.  It's as if it is not even being registered at all.

Here's the code:

var amountPlayed:Number = Math.round(ns.time * tlInterval) / Math.round(duration * tlInterval) * tlInterval;

controls.tl.width = Math.round(amountPlayed) * controls.tlw / tlInterval;

outputBL.text = "Bytes Loaded: " + (ns.bytesLoaded).toString();

outputBT.text = "Bytes Total:  " + (ns.bytesTotal).toString();

The output produces "0";

I tested this with a similar player that uses progressive downloading instead, and I get real data.

Is this lost with FMS?

    This topic has been closed for replies.
    Correct answer

    Yeah... the concept of bytesLoaded and bytesTotal is lost when using FMS. The server only sends data as needed, and video data is not stored in cache on the client side.

    1 reply

    Correct answer
    July 10, 2009

    Yeah... the concept of bytesLoaded and bytesTotal is lost when using FMS. The server only sends data as needed, and video data is not stored in cache on the client side.

    miquael
    miquaelAuthor
    Inspiring
    July 10, 2009

    Thank you for confirming that!  Makes sense now that I think about it.  Good to know.