Multiple videos scenes on iOS

  • Hi all,
    I'm trying to make a KRPano tour containing several videos (with sound) that has to run on iOS as well as other mobile and PC platforms. On iOS I have to start the application with user interaction before the video will start. Thats fine and I understand why iOS does not want its users bothered by autoplaying videos and sound. But my tour consists of several scenes and each scene needs user interaction for the video to start. Is there any (workaround) way to allow playing of the video on the start of a scene without user interaction?
    Do I maybe have to change my hierarchy so the plugin lives in the root element and swap videos to prevent a new player being created? If so, how do I reference the <image> that lives in the scene?

    My project setup is roughly (just the relevant parts):
    <krpano>
    <transition>
    loadscene(%1)
    </transition>
    ....more stuff

    <scene name="scene_1">
    <plugin name="video"
    url.html5="%SWFPATH%/plugins/videoplayer.js"
    url.flash="%SWFPATH%/plugins/videoplayer.swf"
    pausedonstart="false"
    autopause="true"
    autoresume="true"
    loop="false"
    muted="true"
    onloaded="add_video_sources();"
    />
    <image>
    <sphere url="plugin:video"/>
    </image>

    <action name="add_video_sources">
    videointerface_addsource('2880x1440', '%CURRENTXML%/video/Intro.mp4');
    videointerface_play('2880x1440');
    </action>
    <action name="this is called at a certain point.">
    transition(scene_2);

    </action>
    ....more stuff
    </scene>

    <scene name="scene_2">
    <plugin name="video"
    url.html5="%SWFPATH%/plugins/videoplayer.js"
    url.flash="%SWFPATH%/plugins/videoplayer.swf"
    pausedonstart="false"
    autopause="true"
    autoresume="true"
    loop="false"
    muted="true"
    onloaded="add_video_sources();"
    />
    <image>
    <sphere url="plugin:video"/>
    </image>

    <action name="add_video_sources">
    videointerface_addsource('2880x1440', '%CURRENTXML%/video/Intro.mp4');
    videointerface_play('2880x1440');
    </action>
    <action name="this is called at a certain point.">
    transition(scene_3);

    </action>
    </scene>

    <scene name="scene_3">
    <plugin name="video"
    url.html5="%SWFPATH%/plugins/videoplayer.js"
    url.flash="%SWFPATH%/plugins/videoplayer.swf"
    pausedonstart="false"
    autopause="true"
    autoresume="true"
    loop="false"
    muted="true"
    onloaded="add_video_sources();"
    />
    <image>
    <sphere url="plugin:video"/>
    </image>

    <action name="add_video_sources">
    videointerface_addsource('2880x1440', '%CURRENTXML%/video/Intro.mp4');
    videointerface_play('2880x1440');
    </action>
    <action name="this is called at a certain point.">
    transition(scene_2);

    </action>
    </scene>
    </krpano>

  • Hi,

    best is to use 1 video player and just pause it change scene and video files/urls and play again.
    I would certainly take it out of the scenes.

    have a look here.
    https://krpano.com/forum/wbb/inde…77064#post77064

    Hope it helps,
    Tuur *thumbsup*

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!