Wowza Community

Error #2123: Security sandbox violation: BitmapData.draw

Hello,

We have wowza server 3 on a windows 2008 x64 pc by port 80 with:

Application.xml

<Client>
	<IdleFrequency>-1</IdleFrequency>
	<Access>
		<StreamReadAccess>*</StreamReadAccess>
		<StreamWriteAccess>*</StreamWriteAccess>
		<StreamAudioSampleAccess>*</StreamAudioSampleAccess>
		<StreamVideoSampleAccess>*</StreamVideoSampleAccess>
		<SharedObjectReadAccess>*</SharedObjectReadAccess>
		<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
	</Access>
</Client>

Crossdomain.xml

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
	<allow-access-from domain="*" to-ports="*" />
	<site-control permitted-cross-domain-policies="all"/>
</cross-domain-policy>

And our As3 application on the lan with:

At main class:

Security.loadPolicyFile( "http://192.168.1.69/crossdomain.xml" )

At videoPlayer class:

private function init():void
{
	_playerSprite = new MediaPlayerSprite()
	_playerSprite.mediaPlayer.addEventListener( MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, onStateChange )
	var resource:StreamingURLResource = new StreamingURLResource( "http://192.168.1.69:80/vod/mp4:mainstream.mp4/manifest.f4m", StreamType.LIVE_OR_RECORDED )
	var f4mMedia:F4MElement = new F4MElement( resource )
	_playerSprite.media = f4mMedia
	addChild( _playerSprite )
}
private function onStateChange( evt:MediaPlayerStateChangeEvent ):void
{
	if( evt.state == "playing")
	{
		_videoBitmapData = new BitmapData ( _video.width, _video.height, false, 0x000000 )
		_timer.start()
	}
}
private function onTick( evt:TimerEvent ):void 
{
	try 
	{
		_videoBitmapData.draw( _playerSprite )
	}
	catch (err:Error)
	{
		trace("error: " + err.message)
	}
}

Well, the video plays fine, but onTick function trhows “Error #2123: Security sandbox violation: BitmapData.draw” every time the _timer fires.

What are we missing?

Thanks.

You are doing Flash HDS streaming and not RTMP. I do not believe Bitmap Draw works with Flash HDS. I think it only works when streaming using RTMP.

Charlie

fibarra,

We have a technique to help with that requirement:

https://www.wowza.com/docs/how-to-create-apple-app-store-compliant-streams

Note that your stream must contain a 64kbs audio track (preferably AAC) for this to help meet this requirement.

I do not know if there is a way to do bitmapdraw with HDS. The stream in HDS is chunks (segments) of video and audio, much different than a RTMP stream.

Richard

Thanks for your reply.

We want to publish or application on IOS AppStore, so we are concerned about this rule:

9.4 Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 64 kbps audio-only HTTP Live stream

Now we are delivering flv files with IIS over http and Apple accepted our app, but we heard that Apple is rejecting applications using RTMP protocol.

There is no option to use the Bitmap Draw with HDS?

fibarra.

Thanks for your help :slight_smile:

fibarra.