Sie sind nicht angemeldet.

1

Samstag, 19. September 2009, 11:57

SWF Video Framerate

Hi,



I try to show a swf video file when I click a hotspot. So far that works but the desired framerate is ignored. The video is played within seconds - it should run 3 minutes with 25fps. If I play it in another window the framerate is correct.

Any ideas?

2

Samstag, 19. September 2009, 12:50

Hi malojo,

I do not know about the frame rate issue... *sad*

But, why to not use the videoplayer plugin to display your video file?
You can found it here videoplayer plugin (beta)

Hope this can help. (buen ojo) *g*

Saludos.

3

Samstag, 19. September 2009, 14:20

Hi,

the reasion is that I am really new to krpano and that I have no idea how I can link it to a hotspot that it will only shown when the user clicks.

4

Samstag, 19. September 2009, 16:45

Hi malojo,

To have an idea about the videoplayer plugin, take a look at the video-hotspot example that comes with the downloaded krpano 1.0.8 beta. In the xml file, you can change the value of the videourl attribute with your own video file for test...

Zitat

I have no idea how I can link it to a hotspot that it will only shown when the user clicks.

I suggest you to make a copy of the video-hotspot example and substitute the code of the video-hotspot.xml file with the following code:

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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!--
	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 - show a infotext on start -->
	<events onxmlcomplete="showtext([b][i]krpano[br]video hotspot example[/i][/b], infostyle);"
	    	/>


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

	<!-- 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"
			 visible="false"
			 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();"
			 />
			 
	
	<!-- Hotspot added to demonstrate how to communicate with the videoplayer -->
	<hotspot name="hs_GoToVideo"
	     	keep="false"
	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
 	     	zorder="0"
	     	fillcolor 	="0xaaaaff" fillalpha 	="0.70" borderwidth 	="0.0" bordercolor 	="0x000000" borderalpha 	="0.70"
	     	fillcolorhover="0xaaaaff" fillalphahover="0.90" borderwidthhover="4.0" bordercolorhover="0x000000" borderalphahover="0.80"
	     	fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	     	onover=""
	     	onhover="if(hotspot[videospot].visible , showtext(click to stop and hide the video) , showtext(click to show and play the video) );"
	     	onout=""
	     	ondown=""
	     	onup=""
	     	onclick="switch(hotspot[videospot].visible); if( hotspot[videospot].visible, hotspot[videospot].togglepause(), hotspot[videospot].stop() ); "
	     	flying="0"
		>
		<point ath="-375" atv=" 16" />
		<point ath="-345" atv=" 16" />
		<point ath="-345" atv=" 26" />
		<point ath="-375" atv=" 26" />
	</hotspot>

</krpano>

This code have an hotspot added that interact with the videoplayer when clicked. ;-)

Hope this can help.

Salut.

5

Samstag, 19. September 2009, 22:05

Wow...thanks. I'll test tomorrow.

6

Sonntag, 20. September 2009, 11:06

I am doing something wrong. The videoplayer doesn't show, even if I set it enabled by default. I also checked my video file. It plays fine within the testarea but fails in my panorama. Same with the example file. Copied to my pano it doesn't work.



The panorama I have is not an entirly 360 degree panorama. It's about 130x60 degrees ( just some images stiched ). Are they handled different so that this might be the reason why this does not work?



Attached the XML File with my first panorama ( it's a tour about two ). To start it I use the swf file.



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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<krpano version="1.0.8"> 
<events onloadcomplete=""/> 
<view fisheye="0" limitview="range" hlookatmin="-76.885" hlookatmax="76.885" vlookatmin="-8.81" vlookatmax="19.67" fovmin="5" fovmax="170" fov="28.479" hlookat="0" vlookat="5.43"/> 
<autorotate horizon="5.43" tofov="28.47"/> 
<action name="looktohome">lookto(0,5.43,28.48);</action> 
<preview url="UsedomTourdata/UsedomTour0/preview.jpg"/> 
<image type="SPHERE" hfov="153.77" vfov="28.48" voffset="5.43"> 
<sphere url="UsedomTourdata/UsedomTour0/0.jpg"/> 
</image> 
<lensflare name="LENS" set="DEFAULT" visible="true" ath="294.61" atv="-2.46303"/> 
<hotspot name="spot0" onclick="set(state,autoratate.enabled);set(autoratate.enabled,false);lookto(72.2705,1.00129,10,smooth(400,20,100));loadpano(UsedomTour1.xml,null,null,BLEND(1));set(autoratate.enabled,state);" url="UsedomTourdata/spots/hotspot_ani.swf" onhover="showtext(Zu den Sieben Seen);" ath="432.271" atv="1.00129"/> 
<hotspot name="spot1" onclick="set(plugin[html1].visible,true);tween(plugin[html1].alpha, 1);" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25"> 
<point ath="291.983" atv="1.11838"/> 
<point ath="291.983" atv="1.63111"/> 
<point ath="292.973" atv="1.63111"/> 
<point ath="292.973" atv="1.16499"/> 
</hotspot> 
<data name="htmldata1"> 
<p align="right"> 
<font face="Arial"> 
<a href="event:tween(alpha, 0);delayedcall(0.5,set(visible,false));"> 
<b>X</b> 
</a> 
</font> 
</p> 
<include url="bruecke.html"/> 
</data> 
<plugin name="html1" url="UsedomTourdata/graphics/textfield.swf" html="data:htmldata1" visible="false" alpha="0" align="center" width="380" height="400" bordercolor="0xFFFFFF"/> 
<hotspot name="spot2" onclick="openurl(Tor1.html);" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25" onhover="showtext(3D Ansicht Ansbacher Tor);"> 
<point ath="322.067" atv="14.33"/> 
<point ath="322.184" atv="6.56273"/> 
<point ath="320.334" atv="3.09519"/> 
<point ath="319.411" atv="3.10103"/> 
<point ath="316.893" atv="6.40091"/> 
<point ath="316.917" atv="14.1451"/> 
</hotspot> 
<!-- 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 - show a infotext on start --> 
<events onxmlcomplete="showtext([b][i]krpano[br]Video Beispiel[/i][/b], infostyle);" 
/> 

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

<!-- note - the url of the video must be always relative to the main krpano swf file --> 
<hotspot name="videospot" 
url="plugins/videoplayer.swf" 
videourl="cats-short.flv" 
distorted="false" 
ath="000" 
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>

7

Sonntag, 20. September 2009, 11:45

Hi malojo,

Seems to be a path issue of your videourl

Quellcode

1
2
3
4
<!-- note - the url of the video must be always relative to the main krpano swf file -->
<hotspot name="videospot" 
url="plugins/videoplayer.swf"
videourl="%SWFPATH%/PathToYourVideoRelativeToKrpanoSwf/cats-short.flv"

<!-- note - the url of the video must be always relative to the main krpano swf file -->

Have you a link to see what is wrong?

Salut.

8

Sonntag, 20. September 2009, 13:20

The same happens with realtive files ( see example ). You can get it here (0.6 MB )

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »malojo« (21. September 2009, 08:25)


9

Sonntag, 20. September 2009, 13:33

Hi,

Something wrong on the file... error trying to open it.... *sad* Sample.rar 625 KB (640.742 bytes)
Try to upload again.. ;-)

10

Sonntag, 20. September 2009, 14:02

Done.

In case that it still fails to open is a mirror here

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »malojo« (21. September 2009, 08:25)


11

Sonntag, 20. September 2009, 14:04

Hi,

Sorry.... my mistake... I can open the file. ;-)

12

Sonntag, 20. September 2009, 14:33

Hi,

about sample.rar:
Your code is correct .... the problem, at least locally, seems to come from your protected krpano.swf (Videosample.swf)...
Try with a fresh downloaded krpano.swf instead of your Videosample.swf ... It must load the video...

Tell me. ;-)

13

Sonntag, 20. September 2009, 16:31

It does. Thanks for the hint ;)



Regards



Matthias

Ähnliche Themen