Video via Hotspot abspielen lassen Play Video via Hotspot

  • Möchte gerne einen Film laufen lassen, wenn man auf den Hotspot klickt, so wie man Fotos anzeigen kann. Also Film läuft dann in einer Ecke. Konnte bis jetzt keine Lösung im Forum finden. Mit diesem Quellcode gibt nur einen Parser-Error mit schwarzem Bild.

    Can't find solution to play a video when clicking on hotspot (swf) and let the film appear in a hook of the pano.

    Vielen Dank und Gruss Felix


    <hotspot name="spot5" onclick"set(hotspot[spot5].visible,false);set(plugin[videospot1].visible,true);plugin[videospot1].play();" url="testdata/graphics/spots/hotspot_ani_white.swf" onhover="showtext(Mortier-Orgel);" ath="520.348" atv="-4.16876"/>

    <plugin name="videospot1"

    url="%SWFPATH%/plugins/videoplayer.swf"
    videourl="%SWFPATH%/MVI_0983_1.f4v"
    keep="false"
    width="600" height="400"
    scale="0.5"
    visible="true" enabled="true" handcursor="false"
    rx="0" ry="0" rz="0.2"
    distorted="true"
    align="center"
    ath="180"
    atv="0"
    loop="true"
    pausedonstart="false"
    directionalsound="true"
    range="130"
    volume="1.0"
    buffertime="0.1"
    updateeveryframe="true"
    />




    </plugin>

    Edited once, last by fotojehle (April 15, 2010 at 10:43 PM).

  • Vielen Dank iceman, leider war das noch nicht die Lösung, immer noch schwarzes Pano. Fehlermeldung xml-parser #1090.

    Und für Sascha: video hotspot ist eben nicht plugin-videospot. Mit dem Hotspot funktionierts, aber dann ist der Film schon immer da. Ich will ihn aber abrufen via Hotspot.

    Felix

  • Danke iceman, das ist ja wirklich sonderbar. Hat es noch irgendein start oder event nötig?

    Komme aber erst abends oder so dazu. werde mal den Film in flv machen.

    Bis dann Felix

  • Habe auch flv probiert, aber ändert nichts. Wenn ich die Seite ohne Plugin Videospot laufen lasse ist alles gut auch Hotspot-Funktion oder mit Hotspot Videospot läuft alles perfekt. Nur das Videospot Plugin will nicht.
    Na ja, vielleicht kommen wir noch drauf oder ev. Klaus.

    Danke und Gruss Felix


    <krpano version="1.0.8">
    <events onloadcomplete="plugin[combobox].selectitem(foyer);playbackgroundsound(testdata/sounds/sound0.mp3,0);"/>
    <panoview h="90" v="0" fov="90"/>
    <view architectural="1.0"/>
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" fovmin="10" fovmax="100" fov="90" hlookat="90" vlookat="0"/>
    <preview url="testdata/test1/preview.jpg"/>


    <plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true" />
    <plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" />


    <image type="CUBE" multires="true" tilesize="658" baseindex="0">
    <level tiledimagewidth="2631" tiledimageheight="2631">
    <left url="testdata/test1/3/2/%v_%u.jpg"/>
    <front url="testdata/test1/0/2/%v_%u.jpg"/>
    <right url="testdata/test1/1/2/%v_%u.jpg"/>
    <back url="testdata/test1/2/2/%v_%u.jpg"/>
    <up url="testdata/test1/4/2/%v_%u.jpg"/>
    <down url="testdata/test1/5/2/%v_%u.jpg"/>
    </level>
    <level tiledimagewidth="1316" tiledimageheight="1316">
    <left url="testdata/test1/3/1/%v_%u.jpg"/>
    <front url="testdata/test1/0/1/%v_%u.jpg"/>
    <right url="testdata/test1/1/1/%v_%u.jpg"/>
    <back url="testdata/test1/2/1/%v_%u.jpg"/>
    <up url="testdata/test1/4/1/%v_%u.jpg"/>
    <down url="testdata/test1/5/1/%v_%u.jpg"/>
    </level>
    <level tiledimagewidth="658" tiledimageheight="658">
    <left url="testdata/test1/3/0/%v_%u.jpg"/>
    <front url="testdata/test1/0/0/%v_%u.jpg"/>
    <right url="testdata/test1/1/0/%v_%u.jpg"/>
    <back url="testdata/test1/2/0/%v_%u.jpg"/>
    <up url="testdata/test1/4/0/%v_%u.jpg"/>
    <down url="testdata/test1/5/0/%v_%u.jpg"/>
    </level>
    </image>
    <hotspot name="spot0" hview="0" vview="0" fovview="90" hcenter="-23.6459" vcenter="1.77165" onclick="lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100));loadpano(test0.xml,null,null,BLEND(1));lookat(get(hview),get(vview),get(fovview));wait(blend);lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25098" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25098" onhover="showtext(Ausgang);">
    <point ath="331.621" atv="-2.39173"/>
    <point ath="341.169" atv="-2.5689"/>
    <point ath="341.169" atv="6.1122"/>
    <point ath="331.539" atv="6.02809"/>
    </hotspot>
    <hotspot name="spot1" hview="-90" vview="0" fovview="90" hcenter="20.2456" vcenter="1.00003" onclick="lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100));loadpano(test3.xml,null,null,BLEND(1));lookat(get(hview),get(vview),get(fovview));wait(blend);lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25098" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25098" onhover="showtext(Restaurant);">
    <point ath="370.786" atv="-6.28937"/>
    <point ath="389.528" atv="-5.93504"/>
    <point ath="389.705" atv="7.08661"/>
    <point ath="370.835" atv="8.28942"/>
    </hotspot>
    <hotspot name="spot2" hview="0" vview="0" fovview="90" hcenter="-129.465" vcenter="4.96063" onclick="lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100));loadpano(test4.xml,null,null,BLEND(1));lookat(get(hview),get(vview),get(fovview));wait(blend);lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25098" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25098" onhover="showtext(Shop);">
    <point ath="224.47" atv="-12.4016"/>
    <point ath="236.935" atv="-14.1732"/>
    <point ath="236.228" atv="24.0945"/>
    <point ath="224.135" atv="20.7574"/>
    </hotspot>
    <hotspot name="spot3" hview="90" vview="0" fovview="90" hcenter="181.048" vcenter="0.865754" onclick="lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100));loadpano(test2.xml,null,null,BLEND(1));lookat(get(hview),get(vview),get(fovview));wait(blend);lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));" bordercolor="0xffffffff" borderalpha="1" fillcolor="0xffffffff" fillalpha="0.25098" bordercolorhover="0xffffffff" borderalphahover="1" fillcolorhover="0xffffffff" fillalphahover="0.25098" onhover="showtext(Gang-Ausstellräume);">
    <point ath="532.194" atv="-3.76062"/>
    <point ath="549.902" atv="-3.63189"/>
    <point ath="549.902" atv="5.49213"/>
    <point ath="532.324" atv="5.01535"/>
    </hotspot>
    <hotspot name="spot4" handcursor="false" url="testdata/graphics/spots/spot0.swf" onhover="showtext(Karl Frei Orgel);" ath="449.05" atv="-9.12676"/>
    <hotspot name="spot5" onclick="set(hotspot[spot5].visible,false);set(plugin[videospot1].visible,true);plugin[videospot1].play();" url="testdata/graphics/spots/hotspot_ani_white.swf" onhover="showtext(Mortier-Orgel);" ath="520.348" atv="-4.16876"/>

    <plugin name="videospot1"

    url="%SWFPATH%/plugins/videoplayer.swf"
    videourl="%SWFPATH%/MVI_0983_1.f4v"
    keep="false"
    width="600" height="300"

    visible="false" enabled="true" handcursor="false"
    rx="0" ry="0" rz="0.2"
    distorted="false"
    align="center"
    ath="180"
    atv="0"
    loop="true"
    pausedonstart="false"
    directionalsound="true"
    range="130"
    volume="1.0"
    buffertime="0.1"
    updateeveryframe="true"
    onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
    onclick="togglepause();"


    </plugin>

    <!--hotspot name="videospot1"
    url="%SWFPATH%/plugins/videoplayer.swf"
    videourl="%SWFPATH%/MVI_0983_1.f4v"
    distorted="true"
    ath="165"
    atv="0"
    edge="center"
    scale="0.5"
    rx="0"
    ry="06"
    rz="0"
    loop="true"
    pausedonstart="false"
    directionalsound="true"
    range="130"
    volume="0.5"
    buffertime="0.1"
    updateeveryframe="true"
    onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
    onclick="togglepause();"
    /-->

    <!-- text styles for startup text and onhover text -->
    <textstyle name="infostyle"
    origin="center" edge="center" textalign="center" yoffset="-170" 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" fadeintime="1.0"
    />

    <textstyle name="videohoverstyle"
    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" fadeintime="0.5"
    />


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


    </krpano>

  • so funktionierts bei mir:


    <hotspot name="spot"
    url="images/foto.png"
    distorted="true"
    ath="-33.44909237435262"
    atv="3.2333319155676152"
    scale="1.0"
    rx="0" ry="0" rz="0"
    zorder="1"
    onhover="set(hotspot[video].visible,true); tween(hotspot[video].alpha,1,0.5,default); tween(hotspot[spot].alpha,0);"
    onclick="looktohotspot(get(name), 60);"
    />

    <hotspot name="video"
    url="videoplayer.swf"
    keep="false"

    ath="-100"
    atv="0"
    scale="1.0"
    rx="0"
    ry="0"
    rz="0"
    edge="center" ox="0" oy="0"

    zoom="false" distorted="true"
    width="780" height="800"
    scale9grid="" scalechildren="false" rotate="0"
    crop="" ondowncrop="" onovercrop=""
    visible="false" enabled="true" handcursor="true" capture="true" children="true"
    zorder="0"
    alpha="0.00" blendmode="normal" smoothing="true"
    refreshrate="auto"
    onloaded="copyhotspotsettingsfrom(spot);"
    onover="if(ispaused, showtext(click to play), showtext(click to pause);"
    onhover="if(ispaused, showtext(click to play), showtext(click to pause);"
    onout=""
    ondown=""
    onup=""
    onvideocomplete="set(autorotate.enabled,true); set(hotspot[video].visible,false); set(hotspot[spot].visible,true); tween(hotspot[spot].alpha,1,0.5,default);"
    onclick="togglepause();set(autorotate.enabled,false); play();"
    buffertime="0.1"
    details="8"
    directionalsound="true"
    effect=""
    flying="0"
    inverserotation="false"
    iscomplete="false"
    isvideoready="true"
    loop="false"
    outofrangevolume="0"
    pausedonstart="true"
    range="120"
    rangefalloff="1"
    totaltime="6.08"
    updateeveryframe="true"
    videourl="images/film.flv"
    volume="0.7"
    />


    <action name="copyhotspotsettingsfrom">
    copy(distorted, hotspot[%1].distorted);
    copy(ath, hotspot[%1].ath);
    copy(atv, hotspot[%1].atv);
    copy(scale, hotspot[%1].scale);
    copy(rx, hotspot[%1].rx);
    copy(ry, hotspot[%1].ry);
    copy(rz, hotspot[%1].rz);
    </action>

  • Hallo zusammen,

    ich bin neu hier und möchte auch gerne ein Video über einen normalen Mehrpunkt-Hotspot starten lassen.
    Ich habe den Code von sascha_kote übernommen und lediglich die Pfade zum swf-Player und zum Videofile geändert. Außerdem habe ich einen Mehrpunkt-Hotspot verwendet.

    Ich hätte gerne, dass das Video zuerst nicht sichtbar ist und erst nach Klick auf den Test-Hotspot zu sehen und zu starten ist. Es sollte außerdem nach Beendigung auch wieder schließen.

    Allerdings bekomme ich beim Ausprobieren lediglich ein kurzes Rauschen und kann den Videospot weder sehen noch starten, nachdem ich auf den Mehrpunkt-Hotspot klicke. Kann mir vllt jemand helfen?

    Schon mal vielen Dank! Anbei noch mein Code:

  • Also bei mir läuft das Ding schon, doch es kann lokal Probleme geben mit dem Flashplayer. Beim Anklicken des Hotspots kommt einfach nichts und nach einigem Warten ist der Video da! Aber online gibt es dieses Phänomen nicht.
    Du musst wohl beim "test" alpha="0" zusätzlich eintragen, aber wie ich den der Docu sehe muss es eher über die diversen -alphas- gemacht werden. Setz die mal alle auf 0.

    Viel Glück Felix

  • Das ist sicher richtig mit den Alphas, geht halt nicht. Dieser Hotspot ist sehr heikel. Versuche mal statt Polygon einen Punkt (mit ani-black oder white swf), dann siehst du ob es so funktionieren würde.

    Ein anderes Problem könnte auch noch mit stop/play sein. Musste das anders schreiben bei mir:
    Zeile 49 und 50 ersetzen nur mit dieser Roten:


    onloaded="copyhotspotsettingsfrom(videomortier);"
    onhover="showtext(click to stop);"
    onclick="tween(alpha, 0);delayedcall(0.5,set(visible,false));stop(); set(hotspot[videom].visible,false); set(hotspot[videomortier].visible,true); tween(hotspot[videomortier].alpha,1,0.5,default);playbackgroundsound(musikautomatenmdata/sounds/sound0.mp3,0);"
    onout="" ondown="" onup=""
    onvideocomplete="set(autorotate.enabled,false); set(hotspot[videom].visible,false); set(hotspot[videomortier].visible,true); tween(hotspot[videomortier].alpha,1,0.5,default); playbackgroundsound(musikautomatenmdata/sounds/sound0.mp3,0);"

    und das mit "playbachgroundsound" kannst du weglassen, es funktioniert auch so nicht, dass der Sound nach dem Video wieder aufgenommen wird. Habe noch immer keine Lösung gefunden.

    Gruss Felix

  • Hier nochmal mein aktueller Code:

    Also ich möchte wie gesagt gerne über einen Mehrpunkt-Hotspot einen Videoclip einbinden. Online testen kann ich den Code noch nicht, weil ich noch keine Lizenz besitze. Ich bin kurz davor eine zu kaufen, würde aber gern vorher wissen, ob meine Idee so verwirklicht werden könnte. Hat einer evt. ein Beispiel, das zu meiner Vorstellung passt oder kann kurz eins erstellen, damit ich weiß, ob das generell möglich ist. Ich beschäftige mich leider erst seit ein paar Tagen mit krpano, deswegen bitte ich meine dauernden Fragen zu entschuldigen *wink*

  • Also das mit dem Mehrpunkthotspot ist kein Problem, das funktioniert auch damit. Und eine Lizenz brauchst du nicht zum Testen, aber vielleicht musst du noch via Adobe deinen Ordner lokal freigeben, damit es läuft. Hier Infos https://krpano.com/docu/localusage/

    https://krpano.com/docu/localusage/Du wirst zwar noch ein paar Tage zusätzlich investieren müssen, aber die Möglichkeiten und Flexibilität lohnt jede Mühe und der Preis ist ja nicht gerade hoch.


    Gruss Felix

  • Danke! Ich habe nochmal von vorne begonnen und nun klappt es wunderbar. Hier der Code für alle die evt. interessiert sind:

    Allerdings habe ich direkt eine weitere Frage! Ich möchte, dass sich der Videohotspot nach Ablauf des Videos schließt. Das habe ich mit onvideocomplete="set(hotspot[video].visible,false);" gemacht. Wenn ich das Video über den Bildschirm-Hotspot aber wieder sichtbar mache, kann ich das Video nicht nochmal anschauen. Hat jmd. eine Idee wie man das lösen kann?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!