swfobject does not work on https in Chrome
Asked Answered
B

1

6

I am trying to embed a swf file to a page (google app engine page ) by following javascript code:

        <script type="text/javascript">
        //This example uses dynamic publishing with swfObject. Login is handled in the swf

        //Note we are passing in attribute object with a 'name' property that is same value as the 'id'. This is REQUIRED for Chrome/Mozilla browsers           
        swfobject.embedSWF("loader.swf", "flashContent", "640", "480", "10.2", null, null, null, {name:"flashContent"});            

        //REST OF THE CODE
    </script>

It works properly on HTTP, but the content does not work on HTTPS. I've googled a lot but I did not find the solution. I need to use HTTPS for Secure Canvas URL for creating facebook application. As you can see in the comments below, https work on safari but not in Chrome.

Any idea will be appreciated.

Burgin answered 16/2, 2013 at 23:55 Comment(6)
Hmm, I see the same thing on both URL's. I'm not sure whether it's working properly or not. I see a preloader that goes 100% in both cases, but then nothing else after that. The progress bar animates all the way to the right, but then nothing else happens. Is it supposed to do anything after that? I don't think swfobject is the problem since I see the same Flash content on http and https.Obligation
if you can see the progress bar, it means, swf object is embeded to the page and you have not the problem which I mentioned, what is your browser?Burgin
I tried it in Safari and Firefox on Mac OS -- worked correctly. However, with Chrome I get the "alternate" content that tells me I need to have Flash Player 10.2 or later installed. I have Flash 11.5 installed in Chrome. I guess it is an issue w/swfobject after all, but only in Chrome :(Obligation
Yes, you are right, I was trying with Chrome. So what do you think? how we can handle this problem on Chrome?Burgin
The problem seems to be with the swfobject code that detects the flash player version. I would look there and try to debug it. Try to determine the version number its detecting, try (as a test) to allow earlier versions of Flash, etc.Obligation
Looks to me like ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js is not being loaded from your HTTPS page. Try ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js instead.Marutani
M
7

I can see that https://radmahdi.appspot.com/facebook/userstatusweb/index.html is now working for you, once you changed the link to swfobject from HTTP to HTTPS as I suggested in my comment :)

You could do

//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js

as your link, in which case the protocol used will be relative to the page loaded. Which is probably neater.

If you are happy with the solution, please mark the question as answered.

Marutani answered 21/2, 2013 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.