1 Reply Latest reply on Jun 23, 2010 4:45 PM by bringrags

    How to close a connection?

    nchunga Level 1

      How do you "close" a connection using osmf?


      I've been pouring over the ASDOCS, but I can't figure out what the equivalent of

      NetStream.close(); is...
        • 1. Re: How to close a connection?
          bringrags Level 4

          The closing of NetStreams is managed by the framework:  NetStream.close will be called when you unload your VideoElement (which is automatically done when you set MediaPlayer.media to null, for the VideoElement that was previously assigned to MediaPlayer.media).


          The closing of NetConnections is also managed by the framework, but has some additional configurability to enable the reuse/sharing of NetConnections.  NetConnectionFactory (which is used by NetLoader) has a shareNetConnections property which will prevent NetConnections from being closed if more than one NetStream is using the same one.