2 Replies Latest reply on Apr 8, 2011 7:20 AM by Thomas Friedl

    Get NetConnection of current Video?

    Thomas Friedl

      I'm trying to get to the NetConnection of my video that is currently playing. I need the NetConnection to make some calls to our Flash Media Server.

       

      In our current code we use the FLVPlayback and do something like this:

       

      flv_player.ncMgr.getNetConnection().call("startLogging", .......);

       

      How do I do this in OSMF? I already tried this:

       

      var netConnectionFactory:NetConnectionFactory = new NetConnectionFactory();
      netConnectionFactory.addEventListener(NetConnectionFactoryEvent.CREATION_COMPLETE, setNetConnection);
      var netLoader:NetLoader = new NetLoader(netConnectionFactory);

      mediaFactory.addItem(new MediaFactoryItem("org.osmf.elements.video", netLoader.canHandleResource, createVideoElement));

      ....

       

      but apperently my "setNetConnection" function gets never called.