NetStream Bug in Mac Flash Player 9.0.28

In the Mac version of Flash Player 9.0.28, the NetStream event NetStream.Play.Stop does not fire on clips that are longer in length. I did not narrow it down to what length it deteriorated at, but generally the test clips were around 3 to 4 minutes in length. The bug tests were consistent, and could not be replicated in previous versions of the Mac player or any PC player. Just to verify it wasn’t the encoder, the first tests were done encoding with AnyStream, and later attempts were made with encoders such as the Adobe Standalone, which failed as well.

Is this a serious bug, it depends on how you define serious. Most developers use this event to determine completion of a video, even the Adobe FLVPlayback component uses it and fails. In players that display post video messaging, run post rolls, or cycle playlists and rely on this method, these action items simply won’t display or run.

You can attempt workarounds with NetStream.Buffer.Empty and the duration from MetaData. In this specific case, you attempt to catch the Empty event firing at the end of a clip and use that as your completion event. Even if it doesn’t fire in certain race conditions, I recommend at least putting something like this in as backup measures.

All in all, it’s not good when there are inconsistencies in the player. My hope is that it gets addressed soon.

5 Responses to “NetStream Bug in Mac Flash Player 9.0.28”

  1. Kenny do you have more info on this?

    I tried to see if I could duplicate this issue with 9.0.28 on my mac, and I still get the Netstream.play.stop events.

    I’m testing against .mp3 files that are being streamed from FMS 2.0.3.

    Does it only happen with video files in netstreams or do you see it in MP3 files being streamed as well? (Perhaps its just related to video files and not mp3’s)

    What version of FMS are you using, is it 2.0.3 or 2.0.4 (or previous)?

    And just so I am sure i understand, does it fire a netstram.play.stop event back to you, if you issue a stop manually on the netstream? Or does it not issue the play.stop when stream is completed as you would normally expect?

    Thanks for any more info - I’ve been trying to track down a couple weird things with FMS myself and if there is any chance that a specific release tied to a specific OS might be causing issues, I’d love to narrow things down and investigate also.

    Thanks!
    Rob

  2. Kenny Bunch says:

    Actually I should have clarified. It is Video and it’s progressive. Sorry about that.

  3. Hey Kenny - ahhhh- gotcha - I just assumed it was streaming and not progressive becasue thats where my head has been at for the past few months. :) I’ll have to try it out with a progressive download .flv. I’ll let you know if I can recreate it.

    Thanks!
    Rob

  4. jvc says:

    Here’s what I did to work around it - works well so far.
    I detect the player and apply the fix on all mac 9 players
    as I was seeing this happen on short clips with 9.0.18 also.
    This code is pulled from my own VideoPlayer class and is
    just to demonstrate the concept behind it.
    This uses the undocumented Flash 8 only setTimeout
    - more on that here:

    http://www.flashguru.co.uk/flash-8-settimeout/

    var ns:NetStream;
    var isNSBroke:Boolean=false;
    var sysInfo:Object;
    var previousTime:Number;
    var repeatCounter:Number=0;

    detectFlashVersion ();
    if (sysInfo.platform == “MAC” && sysInfo.majorVersion == “9″)
    {
    trace (”WE SHOULD WORK AROUND NETSTATUS”);
    isNSBroke = true;
    setInterval(this, “checkNetstreamTime”, 100);
    }

    function detectFlashVersion ()
    {
    var playerVersion : String = System.capabilities.version;
    sysInfo = new Object ();
    sysInfo.platform = playerVersion.substring (0, 3);
    var versionNumbers : String = playerVersion.substring (4, playerVersion.length);
    var versionInfo : Array = versionNumbers.split (”,”);
    sysInfo.majorVersion = versionInfo [0];
    sysInfo.majorVersionDot = versionInfo [1];
    sysInfo.minorVersion = versionInfo [2];
    sysInfo.minorRevision = versionInfo [3];
    }

    function checkNetstreamTime()
    {
    if (isNSBroke)
    {
    previousTime = ns.time;
    _global ["setTimeout"](this, “nsWorkAround”, 1000);
    }

    }
    function nsWorkAround ()
    {
    if (ns.time == previousTime)
    {
    repeatCounter ++;
    }
    if (repeatCounter >= 5)
    {
    trace(”APPLYING WORKAROUND”);
    //do your videostop actions here
    // I also check if my videoplayer class is paused
    // I also set the repeatCounter to 0 on all my video player buttons
    repeatCounter = 0;
    previousTime = null;
    }
    }

  5. J Kruspe says:

    is it possible that somebody can hep me with a workaround to my code? This is not firing when I get to the end of a video clip using the the mac player. (9.0.28)

    It’s interesting, because it works on a powerpc machine, but not on an intel mac. Both are running the same player. (9.0.28)

    ns.onStatus = function(oInfo:Object):Void{
    if(oInfo.code == “NetStream.Play.Stop”) {
    ns.seek(0);
    ns.pause(true);
    }
    }

    Thanks!

Leave a Reply