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:

  • Nice! I love it!

    I have a question. I'm playing with the example I'm using cats-short.flv. I'm trying to fit it in a wide screen tv. I am able to get the correct height but I cannot stretch it without increasing the height. In other words its always a square. How do I make it a rectangle? Im adjusting rx, ry, rz and it just seems to be tilting the video, also tried adjusting width and height but nothing. I guess I just dont understand these attribute completely. Can anyone enlighthen me? *smile*

    Thanks,
    Milo

  • Hi,

    some parameters in your xml like "ispaused", "ismovie" ... shouldn't be set!
    they will be set internal to their correct value, when they were set many thing can go wrong

    I see the editor plugin will add them but they should be removed from the xml,
    I will fix that in the next editor release

    best regards,
    Klaus

  • I have a question. I'm playing with the example I'm using cats-short.flv. I'm trying to fit it in a wide screen tv. I am able to get the correct height but I cannot stretch it without increasing the height. In other words its always a square. How do I make it a rectangle? Im adjusting rx, ry, rz and it just seems to be tilting the video, also tried adjusting width and height but nothing. I guess I just dont understand these attribute completely. Can anyone enlighthen me? *smile*

    Hi, in this case use the "width" and "height" parameters the change the size,
    a "width" or "height" of "1000" and a scale of "1.0" will cover a 90 degree area in the view,

    best regards,
    Klaus

  • Is it also possible to play a flv video in reverse with the videoplayer?

    Hi,

    reverse? - no, flash doesn't offer a possibility for this,
    I think the reasons for this is, that in the most today video codecs the current frame is based on one or more previous frames (which must be also decoded), so playing/decoding a video reverse will be a cpu overkill
    beside of this - the downloading/streaming would be also need to be reverse

    best regards,
    Klaus

  • 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!

    Hi Klaus,

    Why does updateeveryframe="false" should be used with care, if it can optimize the fps of the player ?

    Thanks

  • Hi Klaus,

    Is it possible to loop specific range of video, for example the lenght of video is 10 seconds. When pano is loaded, I want the first 5 seconds of the video to be played loop (so the loop is from 1st to 5th seconds of the total video lengh). Then, after a short period of time I want the video to continue from 5th second and play until 10th second and also loop.
    Is it possible?

  • Hi,

    Is it possible to loop specific range of video, for example the lenght of video is 10 seconds. When pano is loaded, I want the first 5 seconds of the video to be played loop (so the loop is from 1st to 5th seconds of the total video lengh). Then, after a short period of time I want the video to continue from 5th second and play until 10th second and also loop.
    Is it possible?

    no, thats not possible...


    i also ran in the path issue with the relative urls - i think there is a workaround, see http://bugs.adobe.com/jira/browse/FP-1194
    if that is a solution, is it possible to update the plugin?

    it would be possible to use the %SWFPATH%, %HTMLPATH%, %FIRSTXML% or %CURRENTXML% placeholders
    in the url of the video, so it would be possible to build relative paths,

    best regards,
    Klaus

Participate now!

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