|
|
Source code |
1 |
<script> embedpano({initvars:{ myposter:"http://www.metadelic.com/misc/krpano/examples/360/gotthard_video-1024x512.jpg", mylowvideo:"http://www.metadelic.com/misc/krpano/examples/360/gotthard_video-1024x512.mp4|http://www.metadelic.com/misc/krpano/examples/360/iphone-audio.m4a", myhighvideo:"http://www.metadelic.com/misc/krpano/examples/360/gotthard_video-1024x512.mp4|http://www.metadelic.com/misc/krpano/examples/360/iphone-audio.m4a" }, swf:"360video.swf", xml:"/misc/krpano/examples/360/360var.xml", target:"pano", html5:"auto", mobilescale:1.0, passQueryParameters:true});</script>
|
|
|
Source code |
1 |
<action name="add_video_sources"> videointerface_addsource('1024x512', '%$mylowvideo%', '%$myposter%'); videointerface_addsource('2560x1280', '%$myhighvideo%', '%$myposter%');</action>
|
|
|
Source code |
1 |
<action name="add_video_sources"> videointerface_addsource('1024x512', 'http://www.metadelic.com/misc/krpano/examples/360/gotthard_video-1024x512.mp4|http://www.metadelic.com/misc/krpano/examples/360/iphone-audio.m4a', '%$myposter%'); videointerface_addsource('2560x1280', 'http://www.metadelic.com/misc/krpano/examples/360/gotthard_video-1024x512.mp4|http://www.metadelic.com/misc/krpano/examples/360/iphone-audio.m4a', '%$myposter%');</action>
|
|
|
Source code |
1 2 3 4 5 |
initvars:{
postername:"gotthard_video-1024x512",
videoname:"gotthard_video-1024x512",
audioname: "iphone-audio"
}
|
|
|
Source code |
1 |
videointerface_addsource('1024x512', 'http://www.metadelic.com/misc/krpano/examples/360/%$videoname%.mp4|http://www.metadelic.com/misc/krpano/examples/360/%$videoname%.webm|http://www.metadelic.com/misc/krpano/examples/360/%$audioname%.m4a','http://www.metadelic.com/misc/krpano/examples/360/%$postername%.jpg');
|
This post has been edited 1 times, last edit by "djavet" (Jun 24th 2016, 3:39pm)
I'm trying to call the videointerface_addsource in the onloaded event in JS function as you mentioned, but on I get an error on iPhone. Actually, the error happens when the pausedonstart is set to "true".
Hi,
if you don't want to edit the xml, why not directly using the actions via JS?
E.g. call in the onloaded event a JS function and in that JS function call the videointerface_addsource and videointerface_play actions from there...
Btw - great video!
Best regards,
Klaus
|
|
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 26 27 28 29 30 31 32 33 34 35 36 37 |
<krpano>
<include url="video-player.xml" />
<action name="startup" autorun="onstart">
if(device.panovideosupport == false,
error('Sorry, but panoramic videos are not supported by your current browser!');
,
loadscene(videopano);
);
</action>
<scene name="videopano" title="">
<!-- include the videoplayer interface / skin (with VR support) -->
<include url="skin/videointerface.xml" />
<!-- include the videoplayer plugin -->
<plugin name="video"
url.html5="%SWFPATH%/plugins/videoplayer.js"
pausedonstart="true"
loop="true"
volume="1.0"
panovideo="false"
html5preload="auto"
/>
<!-- use the videoplayer plugin as panoramic image source -->
<image hfov="360" vfov="180">
<sphere url="plugin:video" />
</image>
<!-- set the default view -->
<view hlookat="0" vlookat="0" fovtype="DFOV" fov="130" fovmin="75" fovmax="150" distortion="0.0" />
</scene>
</krpano>
|
Here's the code
Post that code too - the error is very probably there.
|
|
Source code |
1 2 3 4 5 6 |
embedpano({swf:"vendors/krpano/krpano.swf", xml:"vendors/krpano/krpano.xml", target:"pano", html5:"auto", mobilescale:1.0, passQueryParameters:true, onready:krpanoReady, consolelog:true});
function krpanoReady(krpano) {
krpano.call("videointerface_addsource('video', 'assets/video.mp4', 'assets/poster.jpg'");
krpano.call("videointerface_play('video', 'true')");
}
|