0 Replies Latest reply on Jun 21, 2010 9:41 AM by sbuckle

    Accessing NetConnection object in the Flex VideoPlayer component


      I want to be able to access the underlying NetConnection object in sparks.components.VideoPlayer because I need to register a method on the NetConnection client as the server (FMS 3.5.3) calls a "setDuration" method on the client. For example:


      var clientObj:Object = new Object();
      clientObj.setDuration = function(duration:String):void
           // set the scrubber to duration - called by the server
           trace("duration: " + duration);     
      nc.client = clientObj;


      It's easy to do if I create my own custom video player but I'd rather just use the default skin, e.g. scrubber, play button, that comes with the Spark VideoPlayer and not have to re-implement, for example, my own scrubber etc.


      If it's not possible, are there any other players out in the wild that provides access to the underlying NetConnection and NetStream objects?


      I am using the Flex 4 SDK and Flash Builder 4.