Answer the question
In order to leave comments, you need to log in
Proxy swf bridge to bypass sandbox flash restrictions?
Task: to make it possible to send requests to the Internet from a flash launched from a local protocol (widget://, file://, chrome-extension://) without special permissions to www.macromedia.com/support/documentation/en/flashp. ..
Proposed solution: the proxying swf file (bridge), which is loaded into the page opened by the browser via the file (or widget or chrome-extension or any other non-http) protocol, loads another swf file into itself, which is located on the http server. This swf bridge passes all its js calls from the browser to the http swf file, and accordingly receives everything from it and passes it back to the browser.
The solution is based on the assumption that the sandbox model is based on the protocol (link) on which the flash is loaded, so http swf can normally send requests to the Internet (and communicate with its parent to perform the actions we need).
YouTube videos have this implementation - if they are embedded in a local page, they are normally loaded and played. (oddly enough, you can embed a flash from an http server into a flash running locally - perhaps this is only inherent in flash 8 or 7)
As a result, it should turn out that soundmanager2 www.schillmania.com/projects/soundmanager2/(a project for playing audio and video files in the browser completely through the js interface using flash) opened locally on the computer via file:// (flash 9 version) will normally initialize through this proxy, download, play and display files from the Internet. He is specifically interested in this version github.com/scottschiller/SoundManager2/tree/V2.95b...
As far as I suppose everything should be simple, something like this (abstractly)
<pre>//proxy - глобальный объект этого файла
var api_donor = (new FlashFileLoader()).load('http://d.com/swf/soundmager.swf');
proxy.externalInterface.in = function () {
api_donor.in.apply(api_donor, arguments);
}
api_donor.out = function () {
proxy.externalInterface.out.apply(proxy.externalInterface, arguments);
}</pre>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question