SoundMixer.computeSpectrum and other trouble
oeann Aug 20, 2013 6:35 AMHello,
I hope that someone can help me..
i use fms 4.5 and http dynamic streaming in webfolder vod
i read a lot about computeSpectrum and try some solution but no lock.
i use this to play my video:
var factory:DefaultMediaFactory = new DefaultMediaFactory();
var manifestResource:URLResource = new URLResource("http://xx.xx.xx.xx:8134/hds-vod/"+(this.parent as MovieClip).nid"+".mp4.f4m");
var mediaElement:MediaElement = factory.createMediaElement(manifestResource);
(this.parent as MovieClip).mc_videoPlayer.videoPlayer.setMedia(mediaElement);
(this.parent as MovieClip).mc_videoPlayer.videoPlayer.play();
I use this method because not working direct in my mediadisplay:
(this.parent as MovieClip).mc_videoPlayer.videoPlayer.source = "http://xx.xx.xx.xx:8134/hds-vod/"+(this.parent as MovieClip).nid"+".mp4.f4m"
then first question how can add source to mediadisplay (videoPlayer.source) f4m without use my code in red?
second question i want display spectrum visualization with this and no luck too...
i read about this and see that is possible
i add in my application.xml this:
Client.audioSampleAccess = "/"
Client.videoSampleAccess ="/"
and add a crossdomain.xml in my folder
i see this in other post for computeSpectrum:
function doCompute()
{
trace("doCompute: ");
var spectrum : ByteArray = new ByteArray();
SoundMixer.computeSpectrum(spectrum, true);
var spectrumStr:String = "";
var index:Number = 0;
var channelOffset:Number = 0;
for(var i=0;i<2;i++)
{
if (i == 0)
spectrumStr += "Left\n";
else
spectrumStr += "Right\n";
for(var j=0;j<16;j++)
{
var line:String = "";
for(var k=0;k<16;k++)
{
if (line.length > 0)
line += " ";
var currVal:Number = spectrum.readFloat();
line += ""+currVal;
index++;
}
spectrumStr += line + "\n";
}
}
trace(spectrumStr);
}
but nothing work...
SecurityError: Error #2123: Violation de la sécurité Sandbox : SoundMixer.computeSpectrum : file:///C|/xampp/htdocs/test/osmf.swf ne peut pas accéder à null. Accès refusé à tous les fichiers de régulation.
can you help me please????
thanks a lot
