Solved

Cross-domain Bitmapdata.draw(video)

Posted on 2009-05-18
10
1,623 Views
Last Modified: 2013-11-11
Hi,
I need to do snapshots of a live webcam feed, using bd = BitmapData.Draw(video) and I get:

SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///W|/work/myproject/src/odv.swf cannot access rtmp://fms.xxxxxxx.com/live. No policy files granted access.
      at flash.display::BitmapData/draw()
      at StreamingVideoPlayer/connectStream()
      at StreamingVideoPlayer/onNetStatus()

The project files are on a linux server accesible through a mapped FTP drive in Windows.
I have tried different methods (Security.allowDomain('*') , Security.allowInsecureDomain('*'), crossdomain.xml) and nothing seems to work. What should I do?

The project is AS3/Flash Player 10.
0
Comment
Question by:Catalin80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 24414991

this sounds more like a OS security question...  you should probably have it added to more zones...

especially if you have tried all of the normal sandbox issues...


rp / ZA

0
 

Author Comment

by:Catalin80
ID: 24415828
Hi,
Maybe I am forgeting sohing...What are the exact steps in making it work?
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24415941

something I found...

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BitmapData.html#draw()

"Note: The source object and (in the case of a Sprite or MovieClip object) all of its child objects must come from the same domain as the caller, or must be in a SWF file that is accessible to the caller by having called the Security.allowDomain() method. If these conditions are not met, the draw() method does not draw anything.

This method is supported over RTMP in Flash Player 9.0.115.0 and later and in Adobe AIR. You can control access to streams on Flash Media Server in a server-side script. For more information, see the Client.audioSampleAccess and Client.videoSampleAccess properties in Server-Side ActionScript Language Reference for Adobe Flash Media Server.

If the source object and (in the case of a Sprite or MovieClip object) all of its child objects do not come from the same domain as the caller, or are not in a content that is accessible to the caller by having called the Security.allowDomain() method, a call to the draw() throws a SecurityError exception. This restriction does not apply to AIR content in the application security sandbox."


are you using the right Flash Player?

rp / ZA

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Catalin80
ID: 24419243
In publish settings I have setup AS3 / Flash Player 10.
The server (the "video server") and the client are not on the same server as FMS/FMIS, but this issue should have been resolved by Security.allowDomain('*') , Security.allowInsecureDomain('*') that are called on the server.
0
 

Author Comment

by:Catalin80
ID: 24419465
I have moved all SWFs to the same server as FMS (same IP, different subdomains).
Still got the same problem, even when run from browser.
0
 

Author Comment

by:Catalin80
ID: 24419706
My bitmap.draw(video) is called on _video.addEventListener(Event.ENTER_FRAME,onEnterVideoFrame);


public function onEnterVideoFrame(e:Event):void{
   try{
      bitmap_video.draw(_video);
   } catch (error:Error) {
      trace(error); // this gives me error #2123			
   }
}

Open in new window

0
 

Accepted Solution

by:
Catalin80 earned 0 total points
ID: 24420652
Fixed!
On the server, in my broadcast directory, in Application.xml file, I needed to add:

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

in the <Client> node.

Also, in main.asc, I have uncommented the line:

 p_client.videoSampleAccess = "/";
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24530910
Please finish up the question.


rp / Flash Zone Advisor
0
 

Expert Comment

by:plasmainteractive
ID: 25894232
Hallo

i have a question:

how can i create an application.xml, i mean, in where place i put this, and how can i call this archive?
0
 

Expert Comment

by:plasmainteractive
ID: 25894242
i men how can i call it from action script 3
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question