|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<hotspot name="iframe"
url="black.png"
ath="0" atv="0"
distorted="true"
onloaded="add_iframe('https://www.youtube.com/embed/p4j18C0CEEg', 640, 360);"
/>
<action name="add_iframe" type="Javascript">
var iframe = document.createElement("iframe");
iframe.style.position = "absolute";
iframe.style.left = 0;
iframe.style.top = 0;
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = 0;
iframe.src = args[1];
caller.registercontentsize(args[2], args[3]);
caller.sprite.appendChild(iframe);
</action>
|
|
|
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 30 31 32 |
<hotspot name="spotwebcontent"
devices="html5"
tag="webcontent"
visible="false"
distorted="true"
url="%FIRSTXML%/graphics/transparent.png"
ath="-52.435618"
atv="-4.781611"
width="273"
height="280"
rx="-9.1404811779001989"
ry="-10.966652145640637"
rz="-2.0164699792494596"
enabled="true"
capture="false"
handcursor="false"
zorder="2"
zorder_backup="2"
onloaded="add_iframe(http://www.krpano.com, get(width), get(height));"
/>
<action name="add_iframe" type="Javascript" devices="html5">
var iframe = document.createElement("iframe");
iframe.style.position = "absolute";
iframe.style.left = 0;
iframe.style.top = 0;
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = 0;
iframe.src = args[1];
caller.registercontentsize(args[2], args[3]);
caller.sprite.appendChild(iframe);
</action>
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »benji33« (26. November 2015, 10:51)
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comHi klaus:This could be also used to add any other html content. Only two things to respect - the size need to be set and this will work only in HTML5.
add:
Zitat
ERROR: add_iframe - TypeError: caller.sprite is null
|
|
Quellcode |
1 |
renderer="css3d" |
hi klaus:Hi,
add:
Zitat
ERROR: add_iframe - TypeError: caller.sprite is null
to your element.
![]()
Quellcode
1 renderer="css3d"
See also here:
http://krpano.com/docu/xml/#hotspot.sprite
and here:
http://krpano.com/docu/xml/#hotspot.renderer
Best regards,
Klaus