SOLVED: Best way to embed virtual tours hosted in a different domain

  • Thank you very much in advance for helping!



    What do you suggest is the best way to embed virtual tours in my clients website, if a virtual tour is hosted in our server?



    I'm really struggling with this! iframes don't look reliable any more with mobile devices!

    Currently, part of my embedding code is like this:

    Code
    embedpano({swf:"files/tour.swf", xml:"files/tour.xml", target:"pano", html5:"auto", passQueryParameters:true});




    I'm trying to use an absolute url, like this:

    Code
    embedpano({swf:"http://mywebsite.com/files/tour.swf", xml:"http://mywebsite.com/files/tour.xml", target:"pano", html5:"auto", passQueryParameters:true});



    But it doesn't work because it can't find tour.swf neither tour.xml
    Please note that all the files are hosted in a different domain.


    Any ideas?


    Cheers


  • Okay, so we've got it working for desktops but iOS is still not looking so good and it's reporting a fatal error 'loading or parsing failed;

    This is our embed code:

    ...............
    <script src="http://www.clients.tourvista.co.uk/vt/hr_owen/car…y/files/tour.js"></script>
    <script src="http://www.clients.tourvista.co.uk/vt/hr_owen/car…js?tracker=null"></script>
    <div id="pano" style="680px; height:560px;">
    <noscript>
    <div id="align_centre"> <b>Attention:</b><br/> <p>Your browser's Javascript is not activated.</p> <p>Please activate it to see the virtual tour.</p><br/> </div>
    </noscript>

    <script>
    embedpano({swf:"http://www.clients.tourvista.co.uk/vt/hr_owen/car…/files/tour.swf", xml:"http://www.clients.tourvista.co.uk/vt/hr_owen/car…30207161636.xml", target:"pano", html5:"auto", passQueryParameters:true});
    </script>
    ...............

    The xml file contains the crossdomain.xml link which looks like the following:

    ...............

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="clients.tourvista.co.uk" />
    <allow-access-from domain="http://www.clients.tourvista.co.uk" />
    <allow-access-from domain="http://www.clients.tourvista.co.uk" />
    <allow-access-from domain="tourvista.co.uk" />
    <allow-access-from domain="http://www.tourvista.co.uk" />
    </cross-domain-policy>

    .............

    Has anyone got any ideas?

  • did you tested your tour on IOS? (EDIT: oh, silly question. You did as you obviously detected error there)
    You can use IPAD simulator provided by Krpano. I assume there is some code inconsistency that IOS don't like.
    Maybe empty data <data name="coordinates"></data> or something else.

    Also you can try removing security section. Maybe IOS don't like included xml that has no Krpano tags.

    (also have sent you pm)

  • Hi!

    Sorry for taking so long to reply. We've been very busy the last couple of days with this issue!

    We've managed to make a flash virtual tour working crossdomain, but we're stuck how to make it work for the ipad!!!

    This is the html code to embed the virtual tour:

    http://www.clients.tourvista.co.uk/vt/gforces/alfa_romeo/cross.html


    The virtual tour xml file is here:

    http://www.clients.tourvista.co.uk/vt/gforces/alf…/files/tour.xml


    You can see that I've added the crossdomain tags:

    Code
    <security><crossdomainxml url="http://clients.tourvista.co.uk/vt/gforces/crossdomain.xml" /></security>


    And the crossdomain.xml file is here:

    http://www.clients.tourvista.co.uk/vt/gforces/crossdomain.xml


    The error I get in the iPad is:
    FATAL ERROR:
    http://www.clients.tourvista.co.uk/vt/gforces/alf…/files/tour.xml - loading or parsin failed!


    As I said I'm completely stuck! *unsure*

  • I think your problem lies in usage of SWF instead of FIRSTXML. I think viewer on IPAD|IPHONE can't know where SWF is as it is not definied "to him". As I could't change your code on your server I downloaded it and uploaded on my server and changed SWF to apsolute path to your folder and sudenly IPAD simulator brought the pano. More details you have on your PM not to spam forum with links to xml that I will soon remove (as soon you got it for comparison)

  • Did some tests today embeding from ServerA to ServerB and you are right. It does not work on IOS.

    So reading forum it seams that we need to adapt "Access-Control-Allow-Origin":
    link to forum

    Reading: outside link
    it seams simplest to adapt .htaccess file with:


    SetEnvIf Origin "^http(s)?://(.+\.)?(domain\.org|domain2\.com)$" origin_is=$0
    Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is

    Have asked my guru to do it and will come to you with results if you will not be the faster to prove this concept.
    regards
    Umalo

    EDIT: Confirmed working solution: Domain added in .htaceess ,with no SWFPATH but FIRSTXML references and clean XMLs.

    Einmal editiert, zuletzt von Umalo (29. März 2013 um 11:42)

  • I am a complete newbie to krpano and not a programmer to boot. I have been using FPP and had the iframe thing worked out. Now I am screwed. Don't have any idea how to do this. I read the thread and still don't know what to do.

    I do, however have the same situation. All tours are hosted on our servers and we want to keep it that way. I need a full packet of code and some help screwing it together to get my old clients' tours working in krpano.

    Example:
    Cupecoy Condo Virtual tour page in FPP

    This is the code from the client's page:

    This is the target file on our server:

    I need to get help translating the whole mess so I can swap the FPP tour for the krpano tour without changing the code on the client site (if possible).

    This is killing me since I have managed to translate my pans/tilts/zooms and timing from FPP to krpano with less trouble than I expected (many thanks to Klaus for the critical sequencing code) but I thought the iframe would be easy. OOPS!

    HELP!!!!! *confused*

    Stephen

  • I created the crossdomain.xml and upload to the domain. Work well.

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*" secure="false"/>
    <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
    </cross-domain-policy>

    I get from this https://www.adobe.com/devnet-docs/ac…ec/xdomain.html.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!