Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading SWF from different site #11

Open
newacct opened this issue Jun 6, 2010 · 3 comments
Open

Loading SWF from different site #11

newacct opened this issue Jun 6, 2010 · 3 comments

Comments

@newacct
Copy link

newacct commented Jun 6, 2010

Hi,
I was wondering if it would be possible to use Gordon to display an SWF on a different site than the web page it's on. From my understanding, JavaScript on one site can't access files on a different site(?). So does that mean it's impossible?
Thanks,

@matchu
Copy link

matchu commented Jun 7, 2010

Pretty much, yeah. The SWF source is loaded via AJAX, which follows a "must be on the exact same domain" policy.

Hmm. That's an interesting limitation.

(Disclaimer: not maintainer or active contributor)

@jcubic
Copy link

jcubic commented Dec 2, 2018

You can circumvent issue with CORS but gordon append url to directory you're in so If I have code like this:

var movie = new Gordon.Movie("https://jcubic.pl/Flash3D.swf", {id: "movie", width: 480, height: 320});

it try to fetch: http://localhost/projects/gordon/https://jcubic.pl/Flash3D.swf

@jcubic
Copy link

jcubic commented Dec 2, 2018

Found the error:

in movie.js

new Gordon.Parser((/^\w:\/\//.test(url) ? '' : LOCATION_DIRNAME) + url, function(obj){

it should be:

new Gordon.Parser((/^\w+:\/\//.test(url) ? '' : LOCATION_DIRNAME) + url, function(obj){

I would create PR but I don't think that this project is maintained anymore.

jcubic added a commit to jcubic/gordon that referenced this issue Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants