Sie sind nicht angemeldet.

1

Mittwoch, 20. April 2011, 22:02

Possible HTML5 bug.?

I am using Safari 5+ to view this sample.

If the user agent is Windows or Mac it works (uses flash).
If the user agent is iPad (etc.) it fails.

Has anyone else come accross this?
It is not my intent to use setTimeout but there is a delay in my code and it's acting the same.

Quellcode

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
26
27
28
29
<script type="text/javascript" src="/swf/jquery.js"></script> 
<script type="text/javascript" src="/swf/swfkrpano.js"></script> 
<script type="text/javascript"> 
<!-- 
var viewer = {}; 
$(window).ready(function() { 

viewer = createPanoViewer({ 
swf:"/swf/krpano.swf", 
id: "embed-player", 
target: "gallery-main-player" 
}); 

var _xml = "/swf/examples/xml-usage/compass/compass.xml"; 
if (viewer.isDevice("iPhone|iPod|iPad|Android")) { 
_xml = "/swf/examples/xml-usage/compass/compass.xml"; // Obviously these are different in production 
} else { 
viewer.addParam("wmode","transparent"); 
} 
viewer.addVariable("xml", _xml); 
}); 

///*** This breaks HTML5 ***/// 
setTimeout(function() { viewer.embed(); }, 2000); 

//--> 
</script> 

<div id="gallery-main-player"></div>


Thanks,
Jon

2

Donnerstag, 21. April 2011, 23:40

Hi,

right, in the current version, the viewer can't be embedded dynamically,
but in the latest 1.0.8.14 it is possible when the krpanoJS license and viewer are either embedded in the .js file (e.g. by the MAKE PANO or MAKE VTOUR droplets) or included manually in the html file,

best regards,
Klaus