Posts by Andrew

    Hi,

    cross domain access is even more restricted in Javascript than in Flash,
    I'm not sure if there are solutions without proxy servers for this case...

    best regards,
    Klaus

    Hi Klaus,

    is there likely to be a solution to this on the Javascript/HTM5 viewer side? I've found that Apache mod_proxy isn't always available in shared hosting environments or other content delivery methods. My situation is that I have various panos in separate containers on a content delivery network so each pano gets a unique subdomain. I link panos via hotspots and use Loadpano() to jump to each. In the Flash viewer it works fine provided there is a crossdomain.xml in each container. Unfortunately it fails in the js viewer and there is no way of doing mod_proxy URL rewriting on the CDN.

    regards,
    Andrew

    Hi,
    I'm attempting to pass a variable from html to xml, but I'm not having much success. I call the html with a query string containing my variable like this:

    Code
    http://website.com/index.html?viewmode=external

    index.html contains this code for setting up the pano:

    Code
    <script type="text/javascript">
       var swf = createswf("krpano.swf");
       swf.addVariable("xml","pano.xml");
       swf.passQueryParameters();
       swf.embed("pano");
    </script>

    pano.xml contains code in an action to trace the value of the variable when a hotspot is clicked:

    Code
    <action name="tracelog">
       trace('viewmode=',viewmode);
       showlog();
    </action>

    The log just shows "viewmode=viewmode". I'm not using kprotect. Any ideas?

    Hi Klaus, I will pm you a link to an online example. I have a crossdomain.xml file on the domain where the host document resides and in the CDN containers of each pano. Just to explain my setup more clearly. I have a html page that contains an iframe. The source of the iframe points to a container on the CDN that holds the files (html, swf, images, xml etc.) for a pano. Each pano container is assigned a sub-domain by the CDN, so to refer to them I have to give the full http path.

    Code
    http://www.mywebsite.com/index.html -- contains iframe pointing first pano on cdn)
    http://cdn.001.host.com/index.html -- first pano, contains hotspot with loadpano(second pano)
    http://cdn.002.host.com/pano.xml -- xml of second pano


    I tried another way by keeping all the files on the same domain with the panos in separate sub-folders and the loadpano() call on the hotspot using a fully qualified path to the second pano:

    Code
    http://www.mywebsite.com/index.html -- contains iframe pointing first pano on cdn)
    http://www.mywebsite.com/pano1/index.html -- first pano, contains hotspot with loadpano(http://www.mywebsite.com/pano2/pano.xml)
    http://www.mywebsite.com/pano2/pano.xml -- xml of second pano


    Similarly, the viewer tries to load http://www.mywebsite.com/http:/www.mywe…/pano2/pano.xml and gives the error "Loading error - (IO Error)"

    regards,
    Andrew

    Hi,
    I am using a content delivery network and I'm storing panoramas in separate containers which means each panorama has its own URL. I would like to add hotspots to some panoramas which load another panorama when clicked. Something like:

    Code
    <hotspot name="spot_1"
      url="%SWFPATH%/images/hotspsot_marker.png"
     keep="false"
     ath="117.2897" atv="24.1219"
     width="36" height="36"
     scale="1" scale9grid="" scalechildren="false" rotate="0"
     visible="true" enabled="true" handcursor="true" capture="true" children="true"
     onhover="showtext(Click to view this panorama);"
      onclick="loadpano('http://cdn.002.host.com/pano.xml', null, MERGE, blend(1));"
     />


    When I use this code, the krpano viewer tries to load http://cdn.001.host.com/http:/cdn.002.host.com/pano.xml
    That is, it's prepending the current panorama path to the URL and dropping a forward slash after the http on the new URL.

    I tried numerous attempts at escaping the double forward slash but couldn't work it out. Any suggestions on this or advice on whether loadpano() can actually load from another domain would be much appreciated.

    Thanks,
    Andrew

    I found the problem. The cross-domain policy file uploaded as application/octet-stream to the CDN container, a symptom of Rackspace's browser-based upload utility I'm guessing. I deleted the policy file and uploaded another through FireUploader so it now has the correct mime type of text/xml. All works perfectly.

    I'm still baffled as to why the policy file I used in the video container that has an app/octet-stream mime type works for the videos loaded by the plugin *confused*

    It looks like it may be a problem on the krpano player / XML side.

    I have a krpano plugin that launches videos from a menu. It uses its own XML config file to get the URLs of the videos. I have now set the URLs of the videos to their respective locations in a container on the CDN and they all load perfectly.

    Hi Klaus,
    yes, crossdomain.xml resides in the same CDN container as the image files. I found this article by RackSpace http://cloudfiles.rackspacecloud.com/index.php/Simple_Flash_Examples and have used the same crossdomain.xml file they suggest, but I still get the security errors.

    crossdomain.xml

    XML
    <?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="master-only"/>
       <allow-access-from domain="*"/>
       <allow-http-request-headers-from domain="*" headers="SOAPAction"/>
      </cross-domain-policy>

    Hi,
    I'm attempting to host my pano images on a content delivery network, specifically Rackspace Cloudfiles, which is on a different domain to where krpano is hosted. I get this error in krpano player for each of the images:

    ERROR: Security Error - "http://cxxxxx.cdn.cloudfiles.rackspacecloud.com/filename.jpg"

    My XML looks like this:

    Code
    <image type="CUBE" multires="true" tilesize="579">
    		<level tiledimagewidth="3183" tiledimageheight="3183">
    			<left  url="http://cxxxxx.cdn.cloudfiles.rackspacecloud.com/l3_l_%0v_%0h.jpg" />
    			<front url="http://cxxxxx.cdn.cloudfiles.rackspacecloud.com/l3_f_%0v_%0h.jpg" />
    			etc.

    I thought it may be a cross-domain problem so I added this to my XML:

    Code
    <security>
    	<allowdomain domain="*" />
    </security>

    That didn't fix the problem, so I tried this:

    Code
    <security>
    	<crossdomainxml url="http://www.mysite.com/crossdomain.xml" />
    </security>

    ...with this in the crossdomain.xml file:

    XML
    <?xml version="1.0"?>
    <cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
      <allow-access-from domain="*"/>
    </cross-domain-policy>

    ...no joy.

    I'm confused about where the crossdomain.xml is supposed to go. Some threads in the forum say "on the other server" some say "root of your server". I've tried both, but the problem persists.

    Has anyone attempted a similar thing with a CDN, perhaps Amazon S3 or similar?

    Any suggestions much appreciated.

    Thanks,
    Andrew

    Thanks michel. I wrapped the handleChange function in a test for krpano and that has prevented the krpanoswf.call error; however, it hasn't fixed the problem. It looks like the SWFAddress Change event fires before krpano is ready. I need some way to queue the event or flag that it has fired so that when krpano is ready the loadscene calls can be made. I will experiment with the second option Klaus mentioned in that thread.

    Wondering if someone can help me with SWFAddress and krpano. I've got the Back & Forward browser buttons to jump to next and previous panos, but a page reload (Ctrl+R or F5) on a deep link address causes the initial pano to load but with the deep link address in the address bar. E.g. I may have followed a hotspot in a pano (scene1) that takes me to another pano (scene2) and the browser address bar correctly shows http://www.site.com/#/scene2 . However, if I reload the page, krpano shows scene1 with the address bar showing http://www.site.com/#/scene2. And, if I paste the URI (http://www.site.com/#/scene2) into the address bar on new tab, the first scene is loaded, not scene2.

    Here are a few snippets of code:

    Pano XML:

    HTML/Javascript:

    The clumsy IF statement is to get the name portion at the end of the URI to account for paths such as http://www.site.com/region2/scene6.

    Interestingly, it works when the alert functions are uncommented, i.e. alert messages are displayed. The javascript console in Firebug reports this error on first load of the page or page reload:

    krpanoswf.call is not a function
    krpanoswf.call("loadscene(scene1)") line 33

    Any suggestions much appreciated.

    cheers,
    Andrew