1 Reply Latest reply on Dec 9, 2009 1:41 PM by bringrags

    FMS VideoElement and AudioElement

    tyjohnston

      I am getting the following error when switching between a VideoElement and AudioElement:

       

      SecurityError: Error #2123: Security sandbox violation: SoundMixer.computeSpectrum: http://myProject/bin-debug/assets/swf/modules/AudioPlayerModule.swf cannot access
      rtmp://myFMS.vitalstream.com:1935/myFMS_vitalstream_com/_definst_. No policy files granted access.
           at flash.media::SoundMixer$/computeSpectrum()
      

       

      And I'm well aware that you cannot apply any sort of bitmap processing while an RTMP streamed video is present.  So I'm wondering how I can go about clearing any references to that stream when I switch to the AudioElement.  It seems to be keeping that VideoElement hidden in the background ...

       

      Any ideas?

       

      Update:  This does not happen when switching between a single VideoElement and AudioElement, but rather when two VideoElements are placed in a SerialElement (that have the same FMS address ) and the SerialElement switches to the AudioElement.

        • 1. Re: FMS VideoElement and AudioElement
          bringrags Level 4

          Is your AudioElement progressive or streaming?  If the latter, does the stream come from the same FMS instance?  If you can post a code snippet, it might help us to diagnose.  In the absence of that two ideas to explore:

          • It might be possible to forcibly unload each VideoElement/AudioElement when its done playing in the SerialElement.  I would try to hack this into SerialElement (just to verify) by modifying SerialElement.onListenedChildChange to get the load trait of the previous active child and unload it.  (Not sure if it's that simple or not.)
          • You could also try playing with the params to NetLoader.  By default, all NetConnections to the same FMS will be shared.  You can override this via a constructor param to NetLoader.