Hi all
This is my first question: how have I to set the videoplayer code to
keep the video always in center of screen (indipendent of the pano rotation)
and activate it whit a spot image or a botton
thanks a lot
M.teo
Hi all
This is my first question: how have I to set the videoplayer code to
keep the video always in center of screen (indipendent of the pano rotation)
and activate it whit a spot image or a botton
thanks a lot
M.teo
Hi,
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 video-hotspot.xml file, you can change the value of the videourl attribute with your own video file for test...
As you can see in the xml file, the videoplayer is set as an hotspot... Hotspots are relative to the pano itself, this is why the video rotate with him...
You have to set the videoplayer as a plugin...
I suggest you to make a copy of the video-hotspot folder example and substitute the code of the video-hotspot.xml file with the following code based on the original :
<!--
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 -->
<plugin name="videospot"
url="%SWFPATH%/plugins/videoplayer.swf"
videourl="%SWFPATH%/examples/video-hotspot/cats-short.flv"
visible="false"
origin="center"
width="" height=""
x="0" y="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();"
/>
<style name="buttonstyle"
url="%SWFPATH%/plugins/textfield.swf" children="false"
width="100" height="20"
css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
backgroundcolor="0x55FF55" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF"
visible="false"
onover="tween(alpha,0.7,distance(0.3,0.2));"
onout="tween(alpha,1.0,distance(0.3,0.2));"
onloaded="set(alpha,0);set(textblur,15);set(blur,15); set(visible,true); tween(alpha,1,0.3); tween(textblur,0,0.3); tween(blur,0,0.3);"
/>
<plugin name="Button" keep="true" style="buttonstyle"
html="[p]Show Video[/p]"
align="bottom" x="0" y="73"
onclick="action(call_Video);"
/>
<action name="call_Video">
switch(plugin[videospot].visible);
if( plugin[videospot].visible, set(plugin[Button].html,[p]Hide Video[/p]) , set(plugin[Button].html,[p]Show Video[/p]) );
if( plugin[videospot].visible, plugin[videospot].togglepause(), plugin[videospot].stop() );
</action>
</krpano>
Alles anzeigen
Some explanation of the code:
More info about the videoplayer here videoplayer plugin (beta)
More info about the plugin attributes here <plugin>
More info about the hotspot attributes here <hotspot>
Hope this can help.
Salut.
Tanks michel, tanks a lot for your time and yuor so good answer.
M.Teo
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!