Skip to main content
Participant
March 29, 2008
Question

FMS Policy and VideoSampleAccess

  • March 29, 2008
  • 1 reply
  • 1021 views
Hello! I'm trying to access the raw audio and video samples from an RTMP stream and I've done my research but can't overcome the last step. I have FMS 3.0 installed locally and authoring in Flash CS3 with the latest patches and updates. In the Application.xml file I added the two lines:

<AudioSampleAccess enabled="true">/</AudioSampleAccess>
<VideoSampleAccess enabled="true">/</VideoSampleAccess>

inside the <Application> element to allow access from the client, and rebooted the server to make sure it took hold. (and the XML is in the standard VOD application folder). Then I fire up CS3 that is trying to use SoundMixer.computerSpectrum to read the audio samples, but I keep getting the following sandbox issue.

SecurityError: Error #2123: Security sandbox violation: SoundMixer.computeSpectrum: file:///C|/Users/me/Documents/flashstuff/monitor.swf cannot access rtmp://localhost/vod. No policy files granted access.
at flash.media::SoundMixer$/computeSpectrum()
at monitor_fla::MainTimeline/onEnterFrame()

I'm sure its something simple thats missing. Also, the video plays in my client without any problems. Any ideas? Thank you very much for your help!
    This topic has been closed for replies.

    1 reply

    March 31, 2008
    As described in default live/vod apps that comes with FMS3.0; you need to explicitly write these to lines in the server-side script.

    // Inside Function :application.onConnect = function( p_client, p_autoSenseBW ){

    p_client.audioSampleAccess = "/";
    p_client.videoSampleAccess = "/";

    }
    Participant
    March 31, 2008
    Thanks FMSlove. I tried pasting that code alone into a main.asc file in the VOD folder but it still didn't work. Then I copied the whole sample VOD folder into the main one, uncommented the video and audio lines, and now its working great. Thanks again!