You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, August 19th 2010, 2:07pm

Krpano player from main domain and the tour images from sub domains.

Hello,

Assuming that the krpano.swf is domain restricted to "abc.com", can it play tours which is made up of images coming from a subdomain, say "123.abc.com" ?

Below is the sample xml with <!-- Here is the image from the sub-domain --> placed beside the images coming from sub domains.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<krpano version="1.0.8" >

<scene name="scene1" onstart="showtext('[b][i]scene 1[/i][/b]', infostyle);">
<view hlookat="-15" vlookat="-10" fov="90" />
<image type="CUBESTRIP">
<cubestrip url="http://123.abc.com/panos/pano1.jpg" /> <!-- Here is the image from sub-domain -->
</image>
</scene>

<!-- second scene/pano-->
<scene name="scene2" onstart="showtext([b][i]scene 2[/i][/b], infostyle);">
<view hlookat="-110" vlookat="8" fov="100" />
<image type="CUBESTRIP">
<cubestrip url="http://123.abc.com/panos/pano2.jpg" /> <!-- Here is the image from the sub-domain -->
</image>
</scene>

<!-- third scene/pano-->
<scene name="scene3" onstart="showtext([b][i]scene 3[/i][/b], infostyle);">
<view hlookat="-174" vlookat="5" fov="75" />
<image type="CUBESTRIP">
<cubestrip url="http://123.abc.com/panos/pano3.jpg" /> <!-- Here is the image from the sub-domain -->
</image>
</scene>
</krpano>


Thank you.

2

Thursday, August 19th 2010, 3:06pm

I have tried it by creating a sub-domain. It is throwing a "security error: error loading ... image".
Looks like it is not possible. *huh*

Posts: 119

Location: Portland, Oregon

  • Send private message

3

Thursday, August 19th 2010, 7:19pm

Is it a crossdomain problem or a file permissions problem? Does the folder that contains the images have access "x" permissions for world? (711) Does the file have read permissions for world? (744) I don't know if you need a crossdomain.xml file for a subdomain.

Unix File Permission. Forgive me if you already know about how the file permissions work.
You can issue the command "ls -ltr" to get the file and directory permissions. The "." file is a link to the current directory. The ".." file is a link to the directory above. You can change the permissions with the chmod command.
chmod 711 ArbitraryFolderFileName
chmod 744 ArbitraryImageFileName.jpg
chmod 744 *.jpg ( all jpeg images in the directory )
chmod -r 744 *.jpg ( recursively all jpeg images in this folder others below )

The directory / folder that contains the images has permissions of 711 allows access to the folder, but does not allow you to do a directory listing.
Owner is 7 decimal, Group is 1 decimal, and world is 1 decimal.
World permissions of decimal 1 are 001 binary which correspond to the write, read, and access permissions ( executable if it is a file instead of a directory / folder )
You add the binary digits raised to the exponent of the position to obtain the decimal value that you use with chmod or the 0^2 + 0^1 + 1^0 = 1 decimal

Cross domain file

I am copying the source code for a crossdomain.xml file which Klaus posted here
Klauss's crossdomain.xml post

Source code

1
2
3
4
5
6
<?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="domain1.com" />  
	<allow-access-from domain="www.domain1.com" /> 
</cross-domain-policy>

4

Friday, August 20th 2010, 5:51am

x bit is on for the folders containing the images and r bit is on for the images. In any case i would expect I/O error if the files are not accessible. The error was security error, so i think it is more of domain restriction.

About the crossdomain.xml, does it allow wild cards? Something like <allow-access-from domain="*.domain.com" /> ? If i am not wrong this crossdomain.xml should be on the subdomain which is serving the images, right?

Thanks.

This post has been edited 1 times, last edit by "srisa" (Aug 20th 2010, 7:06am)