Play a video inside a 3D model

  • Hello,
    I have an invisible hotspot ("videotv") in my 3D model, when I click on it a video start (hotspot "videospot").
    My problem is about the video positioning, I can't find a way to put it where it should stay (inside the tv area) plus the player it moves around if I navigate inside the 3D model.
    Both hotspot as the same tx,ty,tz value, I've tried to change those values or even to give a value to rx,ry,rz but the video still moves around the screen.
    What am I doing wrong?
    This is my code, please.
    Thank you.

    <style name="hotspot2"
    zoom="true"
    capture="false"
    depth="0"
    depthbuffer="true"
    alpha="0"
    zorder="3"
    enabled="false"
    onloaded="delayedcall(calc(customtransitiontime !== null ? (customtransitiontime+0.5) : 0.5), tween(alpha,0,0,default,set(enabled,true)); );"
    onover="tween(alpha,0);"
    onout="tween(alpha,0);"
    />


    <hotspot name="videotv"
    style="hotspot2"
    url.html5="plugins/videoplayer.js"
    url.flash="plugins/videoplayer.swf"
    url="video/sunrise.png"
    videourl="video/sunrise.mp4"
    distorted="true"
    scale="0.3"
    alpha="0.2"
    visible="true"
    zoom="true"
    tx="187"
    ty="85"
    tz="45"
    ath="0"
    atv="0"
    pausedonstart="true"
    onclick="set(hotspot[videospot].visible,true);" />


    <hotspot name="videospot"

    url.html5="plugins/videoplayer.js"
    url.flash="plugins/videoplayer.swf"
    videourl="video/sunrise.mp4"
    posterurl="video/sunrise.png"
    distorted="true"
    edge="center"
    scale="0.5"
    width="550"
    height="343.75"
    videoheight="343.75"
    videowidth="550"
    rx="0"
    ry="0"
    rz="0"
    tx="187"
    ty="85"
    tz="45"
    ath="0"
    atv="0"
    loop="true"
    pausedonstart="false"
    onclick="set(visible,false);"
    visible="false"
    />

  • Hi,

    sorry, but your code confuses me - why two videoplayer hotspots?

    And about positioning - they don't have the same positions in your code, one has depth=0 the other not, additionally one has a size defined and the other not.

    Best regards,
    Klaus

  • SOLVED

    Hi Klaus,sorry, I'm very confused too (:What I need to achieve it's very simple:

    - have a video in the tv area

    - the video it's invisible until I click on the tv screen to play it

    - that's it!!!


    I've saw the Videoplayer plugin syntax for a 3D-distorted hotspot, but I can't find a solution to put the videoplayer in my tv area (plus I still see the video in the background, even if I don't use an image in the posterurl).
    In my model I have set few infospot with infotext without have any problem, but the video it's driving me nust! :)

    Thank you.
    Regards.

    PS: the tour.edithelper it doesn't show any coordinates in my 3D model view, as you can see in the image here attached.

  • SOLVED

    Hi Klaus,I have another question about how to offset the dollhouse view.
    My 3D model is not centered because I need to start the tour from a specific position, so in the 3D software I've moved the model in the X axis before to export it for Krpano.
    I've supposed that I should have change the view.tx value in the dollhouse action, but I couldn't find a way to solve my problem, please.
    Thank you.

    <action name="dollhouse_view">
    lookto(270,90,40,default,true,true);
    tween(view.oz|view.tx|view.ty|view.tz,calc(''+1200+'|'+image.ox+'|'+image.oy+'|'+image.oz));
    set(control.invert,true);
    </action>

Participate now!

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