1 Reply Latest reply on Sep 10, 2011 9:36 AM by johnnicholas

    rtmp data events

    johnnicholas Level 1

      I am converting a player I originally developed in OVP to OSMF. One of the features we use is data events within the rtmp streams to trigger other UI events. In OVP I could catch a OvpEvent.DATA_MESSAGE from the OvpDynamicNetStream object.

       

      Is there a way to do this functionality in OSMF?

        • 1. Re: rtmp data events
          johnnicholas Level 1
          I figured it out.
          I was originally thinking that it would that the mediaPlayer that would have this but it turned out to be the mediaElement
          _mediaElement.client.addHandler("mycustomdataeventname", handlername);
          function handlername(mydata:String){
               // do something with mydata
          }
          in my case the data was is a JSON string but you will need to match the data to whatever you serialized into the rtmp stream I believe.