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.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,230

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

1

Thursday, February 19th 2015, 4:09pm

addplugin

Hi,
i was trying to dynamically generate the video plugin that is used for the 360 video in the sphere.

like:

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
<action name="CViP" autorun="preinit">

addplugin(video);
set(plugin[video].url.flash,../../plugins2/videoplayer.swf);
set(plugin[video].url.html5,../../plugins2/videoplayer.js);
set(plugin[video].videourl.ios,../../video/heli_small.mp4|../../video/heli_small.webm);
set(plugin[video].videourl.no-ios,../../video/heli_big.mp4|../../video/heli_big.webm);
set(plugin[video].pausedonstart,true);
set(plugin[video].keep,true);
set(plugin[video].loop,true);
set(plugin[video].enabled,false);
set(plugin[video].zorder,0);
set(plugin[video].align,center);
set(plugin[video].ox,0);
set(plugin[video].oy,0);
set(plugin[video].width.no-panovideosupport,100%);
set(plugin[video].height.no-panovideosupport,prop);
set(plugin[video].onloaded,videointerface_setup_interface(get(name)));
set(plugin[video].onvideoready,videointerface_videoready());
set(plugin[video].onvideoplay, );

trace(get(plugin[video].videourl.no-ios));
</action>


But this seems impossible.
Is that correct?

The trace works though.
But it seems that the created plugin is too late to get pickup by the viewer.. or something like that.
I guess in this case we should create the scene with <sphere url="plugin:video" /> after this.. but my second guess is that it is impossible..

Or am i talking nonsence.. which is not unfamiliar to me.. haha

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Posts: 1,852

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Thursday, February 19th 2015, 5:45pm

I don't see why that shouldn't work.
You try replicating the plugin structure here?

http://d8d913s460fub.cloudfront.net/krpa…rpano/video.xml
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Posts: 1,852

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

3

Thursday, February 19th 2015, 5:46pm

I think it's your device attributes.
Those would be parsed at load..
If you set the normal urls and normal device checks it should work.

Source code

1
2
3
4
5
if (device.ios,
set(plugin[video].videourl,../../video/heli_small.mp4|../../video/heli_small.webm);
,
set(plugin[video].videourl,../../video/heli_big.mp4|../../video/heli_big.webm);
);
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,230

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

4

Thursday, February 19th 2015, 5:57pm

Ahhh.. Ok i will try again.
Want to do this because of another bug ( ithink) i found.
With this i could, maybe, tackle the bug

Thanks Sacha!

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

5

Friday, February 20th 2015, 11:22am

Hi,

sorry, that wouldn't work - the <image> element (e.g. with the 'plugin:video' setting) would need to be defined already on pano/scene loading.

A way to set this dynamically anyway would using the 'vars' setting on loadpano/loadscene/loadxml calls:
http://krpano.com/docu/actions/#loadpano

There the <image> settings of that pano/scene to be loaded could be set or overwritten.

Btw - and as already said the device attributes were wrong - these are only static 'filters' for the xml parsing.

Best regards,
Klaus