You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, June 5th 2009, 12:13pm

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:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<hotspot name="video"
         url="videoplayer.swf"
         videourl="video.flv"
         ath="12"
         atv="10"
         scale="0.5"
         rx="0" ry="0" rz="0"
         distorted="true"
         pausedonstart="false"
         loop="true"
         volume="0.7"
         directionalsound="true"
         range="120"
         onclick="togglepause();"
         />



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:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<hotspot name="video"
         url="videoplayer.swf"
         videourl="video.flv"
         ath="12" atv="10"
         scale="0.5" rx="0" ry="0" rz="0"
         distorted="true"
         pausedonstart="false"
         loop="true"
         volume="0.7"
         directionalsound="true"
         range="120"
         onclick="togglepause();"
         />


Some video control examples:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<action name="playothervideo">
    hotspot[video].playvideo(othervideo.flv);
</action>

<action name="stopbutton">
    hotspot[video].stop();
</action>

<action name="playbutton">
    hotspot[video].play();
</action>

<action name="pausebutton">
    hotspot[video].togglepause();
</action>

2

Wednesday, June 10th 2009, 9:43pm

Gyratin - Chaos...

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.
JAT has attached the following image:
  • Testkrpanovideo.jpg

This post has been edited 2 times, last edit by "JAT" (Jun 16th 2009, 11:34pm)


3

Sunday, July 19th 2009, 12:56pm

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

4

Friday, August 28th 2009, 4:00pm

stop playing pano when video is on

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

5

Wednesday, September 2nd 2009, 2:14pm

Hi,

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

e.g.

Source code

1
2
3
4
5
6
<hotspot ...
  ..
  pausedonstart="true"
  onclick="set(autorotate.enabled,false); play();"
  onvideocomplete="set(autorotate.enabled,true);"
/>


best regards,
Klaus

mstoss

Intermediate

Posts: 194

Location: Berlin

  • Send private message

6

Monday, March 1st 2010, 3:38pm

"rewind" feature?

Excellent plugin indeed!

Just an idea: What about a "rewind" parameter? This would be usefull when embedding opening/closing video clips.

Yours,
Michael

7

Monday, March 8th 2010, 10:52am

Hi,
Just an idea: What about a "rewind" parameter? This would be usefull when embedding opening/closing video clips.
stop() will rewind the video to the first frame and pauses there

best regards,
Klaus

mstoss

Intermediate

Posts: 194

Location: Berlin

  • Send private message

8

Saturday, March 13th 2010, 10:43pm

Hi,
Just an idea: What about a "rewind" parameter? This would be usefull when embedding opening/closing video clips.
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

9

Friday, March 19th 2010, 1:15pm

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

10

Tuesday, March 29th 2011, 11:25am

Disable Preloading all vidoes?

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

11

Monday, April 4th 2011, 9:22pm

Hi,

even with - pausedonstart="true" - it's necessary to load the video to get the first frame image,
but you can leave the "videourl" setting empty and call the playvideo(url) on demand to start and load the video only when needed,

best regards,
Klaus