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.

  • "benjamin ziegler" started this thread

Posts: 55

Location: FRance

Occupation: rock clinbing, scuba diving, motorbike....

  • Send private message

1

Thursday, June 25th 2009, 9:53am

how to start video once the VR is fully loaded ?

I was wondering if there is a way to check that the VR images are fully loaded before starting to play videos ?

Any idea ?

THanks
Pro website : www.bziegler.com
Blog : blog.bziegler.com

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Thursday, June 25th 2009, 11:00am

Hi Benjamin,

There is a new attribute onloadcomplete for the xml node <events> .... perhaps this can be a way to do what you expect ... I'm not sure if it is executed when all the elements defined in the xml are loaded or only when the xml itself is loaded... Try it *whistling*

Quoted

new attributes:
....
- <events> - onpreviewcomplete, onloadcomplete (experimental at the moment, warning - can interfere with "onstart")
....
reference: krpano 1.0.8 beta 6 Documentation

Hope this can help. ;-)

Salut

  • "benjamin ziegler" started this thread

Posts: 55

Location: FRance

Occupation: rock clinbing, scuba diving, motorbike....

  • Send private message

3

Thursday, June 25th 2009, 12:43pm

tryed that !

I've a hotspot named = video
i've set its pausedonstart="true"

so it don't start

Then i added this :

Source code

1
2
3
4
5
6
7
<action name="startvideo">
onloadcomplete(action(displayvideo));
</action>

<action name="displayvideo">
play(video);
</action>


doesn't work :(
Pro website : www.bziegler.com
Blog : blog.bziegler.com

4

Thursday, June 25th 2009, 1:24pm

Source code

1
2
3
4
5
<events onpreviewcomplete="action(playbutton);" />

<action name="playbutton">
    hotspot[videospot].resume();
</action>


sur le hotspot video

Source code

1
2
3
...
 pausedonstart="true"
...


ça marche chez moi ;-)
it working home

sinon regardes là/see here videoplayer plugin (beta)

This post has been edited 2 times, last edit by "Job.1" (Jun 25th 2009, 2:29pm)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

5

Thursday, June 25th 2009, 2:29pm

hi job.1,

I have tryed your code but for me it is not working... *sad*
I used the example video-hotspot included in the Kpano package as the base to try...

This is the code:

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!--
krpano 1.0.8 - video-hotspot example
-->

<krpano version="1.0.8">

<!-- use the editor for moving,rotating,scaling hotspots -->
<plugin name="editor"  url="%SWFPATH%/plugins/editor.swf"  />
<plugin name="options" url="%SWFPATH%/plugins/options.swf" />

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
       origin="center" edge="center" textalign="center" yoffset="-150" background="false" border="false"
       fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
       showtime="4.0" fadetime="1.0"
       />

<textstyle name="hoverstyle"
       background="false" border="false" textalign="center"
       fontsize="20" textcolor="0xFFFFFF" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
       fadetime="0.2"
       />


<events onxmlcomplete="showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);"
   onpreviewcomplete="action(playbutton);"
   onloadcomplete=""
   />


<!-- use only a grid preview pano to save download space ;-) -->
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<action name="playbutton">
hotspot[videospot].play();
</action>

<!-- note - the url of the video must be always relative to the main krpano swf file -->
<hotspot name="videospot" 
 url="%SWFPATH%/plugins/videoplayer.swf" 
 videourl="%SWFPATH%/examples/video-hotspot/cats-short.flv"
 distorted="true"
 ath="0"
 atv="0"
 edge="center"
 scale="1.0"
 rx="0"
 ry="0"
 rz="0"
 loop="true"
 pausedonstart="true"
 directionalsound="true"
 range="110"
 volume="0.7"
 onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
 onclick="togglepause();"
 />


</krpano>


I have tried to put the action(playbutton); in an other <events> attribute, onxmlcomplete (because it is sure it is working... the sowtext() is done from this attribute), but it do not work... *sad*

Can you confirm that is working for you?

Merci, Salut.

6

Thursday, June 25th 2009, 2:31pm

I confirm

here I put the action(playbutton) on the onclick of the plugin info *thumbsup*

http://www.visionrhd.com/site/video/bar.html

  • "benjamin ziegler" started this thread

Posts: 55

Location: FRance

Occupation: rock clinbing, scuba diving, motorbike....

  • Send private message

7

Thursday, June 25th 2009, 2:32pm

it works for me !

i used the same code as sugested by Job.1
but i replaced onpreviewcomplete by onloadcomplete

THanks Job.1
Pro website : www.bziegler.com
Blog : blog.bziegler.com

8

Thursday, June 25th 2009, 2:39pm

Try with this one

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!--
krpano 1.0.8 - video-hotspot example
-->

<krpano version="1.0.8">

<!-- use the editor for moving,rotating,scaling hotspots -->
<plugin name="editor"  url="%SWFPATH%/plugins/editor.swf"  />
<plugin name="options" url="%SWFPATH%/plugins/options.swf" />

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
       origin="center" edge="center" textalign="center" yoffset="-150" background="false" border="false"
       fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
       showtime="4.0" fadetime="1.0"
       />

<textstyle name="hoverstyle"
       background="false" border="false" textalign="center"
       fontsize="20" textcolor="0xFFFFFF" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
       fadetime="0.2"
       />


<events onloadcomplete= "showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);action(playbutton);"
  
   />


<!-- use only a grid preview pano to save download space ;-) -->
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<action name="playbutton">
hotspot[videospot].play();
</action>

<!-- note - the url of the video must be always relative to the main krpano swf file -->
<hotspot name="videospot" 
 url="%SWFPATH%/plugins/videoplayer.swf" 
 videourl="%SWFPATH%/examples/video-hotspot/cats-short.flv"
 distorted="true"
 ath="0"
 atv="0"
 edge="center"
 scale="1.0"
 rx="0"
 ry="0"
 rz="0"
 loop="true"
 pausedonstart="true"
 directionalsound="true"
 range="110"
 volume="0.7"
 onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
 onclick="togglepause();"
 />


</krpano>

9

Thursday, June 25th 2009, 2:45pm

it works for me !

i used the same code as sugested by Job.1
but i replaced onpreviewcomplete by onloadcomplete

THanks Job.1


youre welcome, normally it should work with one or the other ;-)

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

10

Thursday, June 25th 2009, 3:00pm

Hi Job.1, Hi Benjmin,

Then I do not understand what I am doing wrong...

After trying again and again, I press the O key to view the debugger window....
there is a WARNING: unknown action command: hotspot[videospot].resume

Why *question*

I am using krpano 1.0.8 beta 8 (build 2009-06-15) on FIREFOX and local server...

an other thing ...

I have tried the following:

Source code

1
2
<events onloadcomplete="showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);"
    />

instead of:

Source code

1
2
<events onxmlcomplete="showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);"
    />

The first code onloadcomplete do not work for me (then I do not understand why it work for Benjamin)
The second code onxmlcomplete work like expected.

*question* *question* *question*

Any idea?
Edited: in a other thread, Klaus explains: link to thread reference

Quoted

maybe you mean - "onloadcomplete" - this will be called when the loading of the images was done
this is why onloadcomplete does not work on my example... there is no <image /> on it *attention* --- End

Thank you, Michel.

This post has been edited 1 times, last edit by "michel" (Jul 1st 2009, 8:55pm)


11

Thursday, June 25th 2009, 3:02pm

have you the good videoplayer.swf ?¿

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

12

Thursday, June 25th 2009, 3:08pm

Hi Job.1,

Sorry... do not see your reply before my one.... *unsure*

I just tried your code... but for me it does not work... *sad*

The debugger show nothing .. no WARNINGS

But I notice that on your code:

Source code

1
onloadcomplete="showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);action(playbutton);"

and this make that the showtext() action is not executed yet (edited: not any more executed ) for me. *attention* *attention* *attention*

*question* *question* *question*

Thank you for your help in trying to understand and learn more about Krpano.

Michel.

This post has been edited 1 times, last edit by "michel" (Jun 25th 2009, 3:23pm)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

13

Thursday, June 25th 2009, 3:13pm

Hi,

Sorry again... *unsure* I take a lot of time to write in English *rolleyes*

This the version I have:
Vidoplayer Plugin (Built 2009-6-15) *huh*

Thanks again. *smile*

Michel

14

Thursday, June 25th 2009, 3:17pm

perhaps you don't have the good player, le last one is Update - 2009-06-15 krpano 1.0.8 beta 8

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

15

Thursday, June 25th 2009, 3:41pm

Hi Job.1,

I have modified your code this way,
your code:

Source code

1
<events onloadcomplete= "showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);action(playbutton);"/>

modified code,

Source code

1
<events onxmlcomplete="showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);action(playbutton);"/>


now the showtext() action return to be executed and the Debugger return showing the warning:
WARNING: unknown action command: hotspot[videospot].play

Bizare *attention*

Do not understand.. *cry*

thank you, Michel.

16

Thursday, June 25th 2009, 3:44pm

be carefull with the syntax, try with this action

Source code

1
2
3
<action name="playbutton">
    hotspot[videospot].resume();
</action>

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

17

Thursday, June 25th 2009, 4:00pm

Hi,

The same... It does not work... and the showtext() action does not appear... *confused*
Syntax must be correct... I do a copy/paste of your code.

2on try changing action on onloadcomplete to onxmlcomplete (like explained before) ...

the result is: the showtext() action is executed correctly... and the Debugger say:

WARNING: unknown action command: hotspot[videospot].resume

*rolleyes* *rolleyes* *rolleyes*

"Qu'est ce que" *question* *attention*

Thanks again, Michel.

18

Thursday, June 25th 2009, 4:01pm

Passes ta page complète de code ici

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

19

Thursday, June 25th 2009, 4:12pm

Hi,

Your code: (ma copie de ton code)

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!--
krpano 1.0.8 - video-hotspot example
-->

<krpano version="1.0.8">

<!-- use the editor for moving,rotating,scaling hotspots -->
<plugin name="editor"  url="%SWFPATH%/plugins/editor.swf"  />
<plugin name="options" url="%SWFPATH%/plugins/options.swf" />

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
   origin="center" edge="center" textalign="center" yoffset="-150" background="false" border="false"
   fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
   showtime="4.0" fadetime="1.0"
   />

<textstyle name="hoverstyle"
   background="false" border="false" textalign="center"
   fontsize="20" textcolor="0xFFFFFF" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
   fadetime="0.2"
   />


<events onloadcomplete= "showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);action(playbutton);"
  
   />


<!-- use only a grid preview pano to save download space ;-) -->
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<action name="playbutton">
hotspot[videospot].resume();
</action>

<!-- note - the url of the video must be always relative to the main krpano swf file -->
<hotspot name="videospot" 
 url="%SWFPATH%/plugins/videoplayer.swf" 
 videourl="%SWFPATH%/examples/video-hotspot/cats-short.flv"
 distorted="true"
 ath="0"
 atv="0"
 edge="center"
 scale="1.0"
 rx="0"
 ry="0"
 rz="0"
 loop="true"
 pausedonstart="true"
 directionalsound="true"
 range="110"
 volume="0.7"
 onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
 onclick="togglepause();"
 />


</krpano>


the modified code: <events onloadcomplete= ... changed to <events onxmlcomplete=...

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!--
krpano 1.0.8 - video-hotspot example
-->

<krpano version="1.0.8">

<!-- use the editor for moving,rotating,scaling hotspots -->
<plugin name="editor"  url="%SWFPATH%/plugins/editor.swf"  />
<plugin name="options" url="%SWFPATH%/plugins/options.swf" />

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
   origin="center" edge="center" textalign="center" yoffset="-150" background="false" border="false"
   fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
   showtime="4.0" fadetime="1.0"
   />

<textstyle name="hoverstyle"
   background="false" border="false" textalign="center"
   fontsize="20" textcolor="0xFFFFFF" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
   fadetime="0.2"
   />


<events onxmlcomplete= "showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);action(playbutton);"
  
   />


<!-- use only a grid preview pano to save download space ;-) -->
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

<action name="playbutton">
hotspot[videospot].resume();
</action>

<!-- note - the url of the video must be always relative to the main krpano swf file -->
<hotspot name="videospot" 
 url="%SWFPATH%/plugins/videoplayer.swf" 
 videourl="%SWFPATH%/examples/video-hotspot/cats-short.flv"
 distorted="true"
 ath="0"
 atv="0"
 edge="center"
 scale="1.0"
 rx="0"
 ry="0"
 rz="0"
 loop="true"
 pausedonstart="true"
 directionalsound="true"
 range="110"
 volume="0.7"
 onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
 onclick="togglepause();"
 />


</krpano>


Merci, Michel.

20

Thursday, June 25th 2009, 4:12pm

rajoute cette ligne à ton hotspot

Source code

1
visible="true" enabled="true" handcursor="true" capture="true" children="true"