Change controls for photo and video in same tour

  • Hey,

    currently I'm trying to make a tour with photos and videos. Both are stored in different scenes. For the videos i use the video plugin.

    Photo scene:

    Code
    <scene [...]>
    	<view [...]>
    	<image>
    		<sphere url="..." />
    	</image>
    	[...]
    </scene>

    Video Scene:

    Code
    <scene [...]>
    	<plugin name="video" onloaded="addvideosources();">
    	<image>
    		<sphere url="plugin:video" />
    	</image>
    	<view [...]>
    	<action name="addvideosources">
    		[...]
    	</action>
    </scene>

    So for switching the skins (for multiresolution videos, better timeline control, etc.) I used the "demotour-corfu-skinselect" example as the base. It consists of a loader xml which handles the skin selection and a rout.xml.

    My loader xml is "parent.xml"

    When first called, it sets the variable "design" (the skin reference) to its default value "normal". This ist done BEFORE the skins are included with an if statement (see https://krpano.com/forum/wbb/inde…&threadID=13439).

    The "tour.xml" calls when clicking on an hotspot the "change_skin_design('video',%EXAMPLESCENENAME%);" action. But the result is the videointerface control buttons being loaded on top of the old controls.

    Image of the result: https://imgur.com/a/g50oEl1

    Does anybody have an idea how to load the videointerface skin correctly or how to remove the old skin an control buttons when loading a new scene?


    Thanks a lot

    chaotic bruno

  • toosten,

    these two actions are nowhere defined in the files of krpano. So it gives me "WARNING: Unknown action: showpanocontrol" .
    Since these actions don't exist in any of the example skins: are there skins with this feature available elsewhere in the forums?

    Another try was to do "removelayer(skin_layer);" and then loading the skin again with "loadpano("/showroom/krpano/skin/videointerface.xml", null, null, null);".
    But after removing the skin_layer, krpano couldn't find the scenes via "loadpanoscene("/showroom/showroom.xml", %2, null, IGNOREKEEP, NOBLEND);". But the scene clearly exists in showroom.xml.


    Thanks for your help!

  • toosten

    Das Ergebnis https://imgur.com/a/g50oEl1 war bereits NUR das Video-Skin. Das Problem bei der ganzen Geschichte sind die Aktionen, die in den Skins (vtour und video) teilweise gleiche Namen hatten. Somit wurden zwar beim Laden einer Video-Szene mit dem Flag "IGNOREKEEP" die ganzen Layer von dem vorherigen Skin entfernt, jedoch blieben die Aktionen und Events von vtour erhalten und brachten damit die Formatierung der Kontrollelemente durcheinander.

    Indem allen Layern, Aktionen und Events ein individueller Name in den XML's gegeben wurde, lädt eine neue Szene korrekt. (hierfür habe ich im video skin alle Positionen, in denen "skin_" stand mit "skin_video_" ersetzt)

    Am schönsten wäre es natürlich, wenn man in der XML ein Dummy-Element à la "<div>" hinzufügen könnte, mit dem man nicht nur die Layer, sondern auch Aktionen und Events löschen kann, die man durch das Inkludieren eines Skins geladen hat.

  • Am schönsten wäre es natürlich, wenn man in der XML ein Dummy-Element à la "<div>" hinzufügen könnte, mit dem man nicht nur die Layer, sondern auch Aktionen und Events löschen kann, die man durch das Inkludieren eines Skins geladen hat.

    Im Javascript können auch keine zwei Skriptdateien mit dem selben Funktionsnamen verwendet werden ohne das es zu Problemen kommt.
    Bei diversen Compilersprachen würde man beim Kompilieren Fehlermeldungen bekommen oder mindestens Warnungen.

Participate now!

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