Skip to main content
Inspiring
November 15, 2014
Answered

Security error 2123 on local video file

  • November 15, 2014
  • 1 reply
  • 563 views

I have an air app that reads in a video to a byteArray and then sends that over a socket to a connected client. I can then play the video on the client just fine. But I need to extract a chunk of the video and blow that up to full screen. Soon as I try and do a draw() on the video into a bitmapData I get the security error. The only methods I know of to fix this involve crossdomain.xml but I don't believe that would apply here. Any ideas?

This topic has been closed for replies.
Correct answer dmennenoh

Actually, it's a full on BUG in the security system but I have managed to get it working somewhat... Instead of drawing a piece of the video into a bitmap I instead am scaling the video to some huge size - like 18000 x 10000 and positioning it so I see just the chunk I need. I'd much rather have the freedom of placing into a bitmap but for now this should work. Still a solution to a problem that shouldn't exist though.

1 reply

kglad
Community Expert
Community Expert
November 15, 2014

if you control a file server you can use an executable (like a php file) to load the cross domain video and send to your air app.  you'll need a cross domain file on your server.

and, i believe, you can probably write your bytearray to a local file, then load that (using a 2nd loader) and use the 2nd loader to 'draw' the bitmap.

dmennenohAuthor
Inspiring
November 15, 2014

There are two air apps - one is the server running serverSocket and it loads the video file. Other air apps, exe, apk, and ios run the client and connect to the server. The server pushes the byteArray video to each client and then the clients play the video. So there is no way to use PHP here. Writing to a local file on each client could work...but it's for three different OS'. This is just such a ridiculous damn problem - it's more of a serious flaw in the' security' system. It's my network, my two AIR apps... a totally closed system and I cannot do what I need without a bunch of workaround or if at all. Very frustrating. Such BS.

dmennenohAuthorCorrect answer
Inspiring
November 16, 2014

Actually, it's a full on BUG in the security system but I have managed to get it working somewhat... Instead of drawing a piece of the video into a bitmap I instead am scaling the video to some huge size - like 18000 x 10000 and positioning it so I see just the chunk I need. I'd much rather have the freedom of placing into a bitmap but for now this should work. Still a solution to a problem that shouldn't exist though.