I am trying to stream into a mySWF.swf a myFLV.flv located in wowza/content/myContentDirectory.
I`m getting the following error in flash output window:
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: mySWF.swf cannot access rtmp://localhost/myContentDirectory. No policy files granted access
The wowza server throws me this error:
java.io.FileNotFoundException
the system cannot find the file specified
I do have:
wowza/content/myContentDirectory/myFLV.flv
wowza/applications/myContentDirectory
and this is my wowza/conf/myContentDirectory/application.xml file:
<Root>
<Application>
<!-- Uncomment to set application level timeout values
<ApplicationTimeout>60000</ApplicationTimeout>
<PingTimeout>12000</PingTimeout>
<ValidationFrequency>8000</ValidationFrequency>
<MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
<MaximumSetBufferTime>60000</MaximumSetBufferTime>
<MaximumStorageDirDepth>25</MaximumStorageDirDepth>
-->
<Connections>
<AutoAccept>true</AutoAccept>
<AllowDomains></AllowDomains>
</Connections>
<!--
StorageDir path variables
${com.wowza.wms.AppHome} - Application home directory
${com.wowza.wms.ConfigHome} - Configuration home directory
${com.wowza.wms.context.VHost} - Virtual host name
${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
${com.wowza.wms.context.Application} - Application name
${com.wowza.wms.context.ApplicationInstance} - Application instance name
-->
<Streams>
<StreamType>default</StreamType>
<StorageDir>${com.wowza.wms.AppHome}/content</StorageDir>
<Properties>
<!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
<!--
<Property>
<Name></Name>
<Value></Value>
</Property>
-->
</Properties>
</Streams>
<SharedObjects>
<StorageDir></StorageDir>
</SharedObjects>
<Client>
<IdleFrequency>-1</IdleFrequency>
<Access>
<StreamReadAccess>*</StreamReadAccess>
<StreamWriteAccess>*</StreamWriteAccess>
<StreamAudioSampleAccess></StreamAudioSampleAccess>
<StreamVideoSampleAccess></StreamVideoSampleAccess>
<SharedObjectReadAccess>*</SharedObjectReadAccess>
<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
</Access>
</Client>
<RTP>
<!-- RTP/Authentication/Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
<Authentication>
<Method>digest</Method>
</Authentication>
<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
<AVSyncMethod>senderreport</AVSyncMethod>
<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
<Properties>
<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
<!--
<Property>
<Name></Name>
<Value></Value>
</Property>
-->
</Properties>
</RTP>
<MediaCaster>
<Properties>
<!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
<!--
<Property>
<Name></Name>
<Value></Value>
</Property>
-->
</Properties>
</MediaCaster>
<MediaReader>
<Properties>
<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
<!--
<Property>
<Name></Name>
<Value></Value>
</Property>
-->
</Properties>
</MediaReader>
<!--
<Repeater>
<OriginURL></OriginURL>
<QueryString></QueryString>
</Repeater>
-->
<Modules>
<Module>
<Name>base</Name>
<Description>Base</Description>
<Class>com.wowza.wms.module.ModuleCore</Class>
</Module>
<Module>
<Name>properties</Name>
<Description>Properties</Description>
<Class>com.wowza.wms.module.ModuleProperties</Class>
</Module>
<Module>
<Name>logging</Name>
<Description>Client Logging</Description>
<Class>com.wowza.wms.module.ModuleClientLogging</Class>
</Module>
<Module>
<Name>flvplayback</Name>
<Description>FLVPlayback</Description>
<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
</Module>
</Modules>
<Properties>
<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
<!--
<Property>
<Name></Name>
<Value></Value>
</Property>
-->
</Properties>
</Application>
</Root>
This is my AS3 streaming class:
package {
import flash.display.MovieClip;
import flash.events.NetStatusEvent;
import flash.events.AsyncErrorEvent;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.Video;
public class whole extends MovieClip {
public var connection_nc:NetConnection = new NetConnection();
public var stream_ns:NetStream;
public var my_video:Video=new Video(123.4, 191);
public function asyncErrorHandler(event:AsyncErrorEvent):void {
trace("BRK problem: "+event.text);
}
public function NCasyncErrorHandler(event:AsyncErrorEvent):void {
trace("BRK NC problem: "+event.text);
}
public function onBWDone():void {
//trace ( "onBWDone! : " + args );
}
public function netStatusHandler(e:NetStatusEvent):void {
var code:String=e.info.code;
if (code=="NetConnection.Connect.Success") {
var customClient:Object = new Object();
stream_ns=new NetStream(connection_nc);
stream_ns.client=customClient;
stream_ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
customClient.onCuePoint=cuePointHandler;
this.addChild(my_video);
my_video.attachNetStream(stream_ns);
stream_ns.play("myFLV");
} else {
trace(code);
}
}
function whole() {
connection_nc.client=this;
// Put the RTMP URL here, leaving off the name of the video:
connection_nc.connect("rtmp://localhost/myContentDirectory");
connection_nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
connection_nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, NCasyncErrorHandler);
}
function cuePointHandler(CuePoint:Object):void {
trace(CuePoint.name);
}
}
}
Where am I erring, please ?