videoplayer plugin (beta)


  • Videplayer Plugin - videoplayer.swf (1.0.8 beta 9)

    • this plugin can be used to play videos inside krpano
    • as normal flat video (via <plugin>)
    • or as 3D distorted hotspot (via <hotspot>)


    Download:
    download it with the latest 1.0.8 beta version

    Example:
    VIDEO HOTSPOT EXAMPLE
    XML

    Example usage:


    Attributes:

    • videourl

      • url of the video
      • can be any FLV Flash video (.flv) or any H.264 coded video (.mp4, .m4v, .mov, .3gp)
      • Note - for H.264 coded videos Flash Player 9.0.115 or higher is needed (update the minimum Flashplayer version for this in the HTML file)
      • NOTE - the video url must be always relative to the main krpano swf file!!!
        this is a flashplayer bug and there unfortunately no way to fix it,
        see here: http://bugs.adobe.com/jira/browse/FP-1194
    • pausedonstart

      • set if video is paused on start
      • "true" or "false", default="false"
    • loop

      • loop video or stop at end
      • "true" or "false", default="false"
    • volume

      • video sound volume
      • 0.0 - 1.0, default="1.0"
    • directionalsound

      • use directional sound when the video is played as hotspot
      • "true" or "false", default="true"
    • range

      • range of the directional sound
      • 1 - 360, default="90"
    • buffertime

      • time in seconds that should be buffered before starting playing
      • default="0.1" (=Flash default)
    • updateeveryframe

      • default="true"
      • only for performance optimizations!
      • has only an effect when the video is played as distorted hotspot!
      • when set to "false":

        • the video frame will be only refreshed/updated when flash reports "there is a new frame"
        • this reduces the cpu load but in situations where the flashplayer has much work to do, this can cause frame skipping (e.g. while moving in the pano)
        • so use "false" with care!


    Read only attributes/states:

    • ispaused

      • check the pause state of the video
      • "true" or "false"


    Events:

    • onvideocomplete

      • will be called when the video was played completely
      • only when "loop" is set to "false"


    Interface actions/functions:

    • playvideo(url);

      • opens a new video stream and starts playing it
      • a currently playing video will be stopped and closed in this case
    • closevideo();

      • stops and closes the video stream
    • stop();

      • stops the video and moves to the first frame and pauses there
      • the video can be resumed via play() or resume()
    • pause();

      • pauses the video at the current frame
      • the video can be resumed via play() or resume()
    • play(); or resume();

      • resumes a paused video
    • togglepause();

      • pauses or resumes a video


    XML example:

    Some video control examples:

  • Very cool feature! Thx.

    But did you know a small helping tool, where i can fix the gyration (and change it or get a output into the right rx,ry,rz-coordinates)?
    I tried now three hours to adjust a video on a video screen on a house (in parallelogram style), but it didnt work (is always to much distorted etc.) *cry* - see attachment.

  • Hi,

    the width/height (for the correct aspect) must be changed manually at the moment,
    but the position can be easier changed with "editor" plugin, select [editor]->[hotspots], then you can move/rotate/scale the hotspot with the mouse and keyboard,

    a more direct/easier positioning of the hotspots (via dragging the "edges") is also planned,

    best regards,
    Klaus

  • Klaus,

    thank you for the video-plugin .. it worls well ...
    my question: is there a way to stop the pano rotating while the video is playing and start rotating when video stops ?
    i did run through the docu, but couldn't find any hint ...

    best regards
    mthrills

  • Hi,

    you could disable the auto rotating before the play() call,
    and enable it on the onvideocomplete event,

    e.g.

    Code
    <hotspot ...
      ..
      pausedonstart="true"
      onclick="set(autorotate.enabled,false); play();"
      onvideocomplete="set(autorotate.enabled,true);"
    />

    best regards,
    Klaus

  • Hi,

    stop() will rewind the video to the first frame and pauses there

    best regards,
    Klaus

    hm. Thank you Klaus. Now I see, that I was not clear enough about that. I did not mean "rewind the movie" to the first frame but play the movie in opposite direction. Can this be achieved somehow? This would be very useful when showing technical stuff moving in one direction and back. So one could establish a button for "open" or "forward movement" and another one for "closing" or "backward movement". A workaround would be to create video_1.flv e.g. "opening" movement, and video_2.flv e.g. "closing" movement. But this would cause double the file size to be transferred and I have an example with 3 MB here. I guess especially this use of videos will become more important and thus I would very much appreciate this.

    Yours,
    Michael

  • Hi,

    no, rewind here just means moving to the first frame and stopping there,
    but the play direction will be the normal,

    a real reverse playing is technically not possible,
    (theoretical the complete video could be decoded and all frames be buffered in memory,
    and then the frames played manually backward, but this would need a normal loading
    before and also (the bigger problem) a lot of memory!)

    best regards,
    Klaus

  • Hi - the video player is great - thanks.
    But we have some problem with the prelod. On a tour we use many videos (large videos with 100 MB and more). Now we search for a way to disable the preload feature. With the "network" tab on firebug I see, that all videos in a panorama are beginning to load on entering the panorama. We used the newest beta plugin with the pausedonstart function, but the videos are still loading. We also tried the "preload=false" option. But nothing works. On entering a next panorama in a tour, the videos from the first pano are still loading in background an the new videos of the entered pano loads to. So I get a massive Network data tranfer. We are happy to get workaround about that. Can anyone help us. I also tried to use a extern flashplayer (a single .swf file). But that doesent work well because of the click and the windows close function.
    Thanks for help
    Christoph

Participate now!

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