Results 1 to 5 of 5

Thread: IMediaStreamActionNotify2 Stream Watchdog

  1. #1
    Join Date
    Dec 2007
    Posts
    25,647

    Default IMediaStreamActionNotify2 Stream Watchdog


    This forum post has moved to the following article:

    http://www.wowzamedia.com/forums/content.php?171

    Enjoy,
    The Wowza Team
    Last edited by charlie; 10-05-2010 at 12:38 PM.

  2. #2

    Default

    I'm sorry to bring back an old post but nowdays it's all about AS3. How can I add that callback to the JW Player version 5?

    They tell me I should place the code in the NetClient.as file (src/com/longtailvideo/jwplayer/utils/NetClient.as) but I can't figure out how to do it. Any advice or better yet, an example?

    This is the only piece of functionality I'm missing to start streaming.

    Thanks!!!

  3. #3
    Join Date
    Dec 2007
    Posts
    25,647

    Default

    Callbacks in JW player are handled in

    com.longtailvideo.jwplayer.utils.NetClient.as
    You have to add the callback, eg:

    Code:
    /** customCallBack handler. **/
    		public function customCallback(obj:Object):void {
    			forward(obj, 'captioninfo');
    		}
    Data is actually handled in this file:

    com.longtailvideo.jwplayer.media.RTMPMediaProvider .as
    And in this function:
    Code:
    function onClientData
    I happen to know this, but for more support you might need to tap the JW Player forum.

    Richard

  4. #4

    Default

    Hi Richard, you rock!
    Quote Originally Posted by rrlanham View Post
    I happen to know this, but for more support you might need to tap the JW Player forum
    I've tried this but they said:
    I can't really provide code for you, but I can tell you how the NetClient class works. If you set the NetStream.client property to some object, the stream will call all of its callback functions on this object (see http://www.adobe.com/livedocs/flash/...am.html#client). In the JWPlayer, the NetClient class is used for this purpose, and all of the NetStream callbacks are defined here.

    When one of the callbacks are received, the NetClient class packages up the data and sends it back to the MediaProvider, by calling the provider's onClientData() function, passing the data back that way.
    and there are LOTS of ppl like me that need things like this but they won't provide support for it. Their forum is filled with answers like that.

    Is this OK to you for this callback in particular?
    Code:
    /** customCallBack handler. **/
    
    public function customCallback(clientObj:Object):void
    {
    	clientObj.streamStats = function(streamName:String,currSeq:String,msg:String,date:String):void
    	{
    		trace("Stream stats. Name: " + streamName + " currSeq: " + currSeq + " msg: " + msg + " date: " + date);
    	}
    }
    Thanks once more!

  5. #5
    Join Date
    Dec 2007
    Posts
    25,647

    Default

    That would work, the callback will be handled right there. If you need the data in the RTMP provider, which you might, you should leave the forward mechanism in place and handle the data that is returned in com.longtailvideo.jwplayer.media.RTMPMediaProvider .as in the onClientData. You have to add a case to that function.

    With JW Player and Flash Builder, it is fairly painless to step through this with the debugger and look at all the data that is available, etc.

    Richard

Posting Permissions

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