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>

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

2

Saturday, June 6th 2009, 6:27pm

edit ... my krPano was not up to date !
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

This post has been edited 1 times, last edit by "nelk" (Jun 6th 2009, 6:42pm)


3

Saturday, June 6th 2009, 10:32pm

http://visionrd.com/video1/bar.html

working well, but sometimes only one stop with the pause button ?¿

I think the first time we click on the pause button it don't work *blink*

This post has been edited 1 times, last edit by "Job.1" (Apr 8th 2013, 11:12am)


milotimbol

Intermediate

Posts: 211

Location: Antipolo City, Philippines

Occupation: Software Engineer

  • Send private message

4

Sunday, June 7th 2009, 3:54am

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

5

Sunday, June 7th 2009, 11:27am

ARGHL ...!!, I see my mistake the "ispaused" is not the same on the 3 hotspots, now I put "false" in both and all working well now

This post has been edited 1 times, last edit by "Job.1" (Jun 7th 2009, 11:58am)


6

Monday, June 8th 2009, 3:33pm

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

7

Monday, June 8th 2009, 3:36pm

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

8

Monday, June 8th 2009, 3:37pm

Hi, Klaus

Many thanx ;-)

9

Sunday, October 4th 2009, 4:33pm

play video in reverse

Hi Klaus,



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



gr. tangelder

10

Wednesday, October 7th 2009, 3:34pm

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

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

11

Monday, October 26th 2009, 4:49pm

RE: videoplayer plugin (beta)



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
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

12

Monday, October 26th 2009, 8:38pm

Hi,

it can make the video jerky because of potentially frame skips (especially during panning in the pano),
and yes it can optimize the fps a bit,

just try it

best regards,
Klaus

Felipeca

Beginner

Posts: 24

Location: México City

Occupation: Dsigner, 3dmodeler and photographer

  • Send private message

13

Tuesday, December 29th 2009, 11:50pm

Video won't always show.

Hi,

I'm programming my first pano with video embedded. I am testing it on my desktop (haven't upload yet to web) and after adding control buttons my video doesn't always load. When it loads, it works fine.

Any suggestion?

Thanks in advance.

14

Thursday, December 31st 2009, 12:46am

I'm programming my first pano with video embedded. I am testing it on my desktop (haven't upload yet to web) and after adding control buttons my video doesn't always load. When it loads, it works fine.

Any suggestion?
are you using the latest videplayer version?
(the one from the first post here)

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

15

Thursday, December 31st 2009, 10:59am

Hi,

I think I have seen the same issue, and it's very difficult to reproduce. It's maybe 1/5, the video doesn't show up.

But I don't remember if it was the last video plugin.

Regards,
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

16

Saturday, January 2nd 2010, 1:09pm

Hi,
But I don't remember if it was the last video plugin.
open the videoplayer.swf direct in the browser or with the standalone flashplayer,
that will show the version of the plugin,

best regards,
Klaus

17

Thursday, February 18th 2010, 12:48pm

Conditional loop

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?

ZODIACBLUE

Beginner

Posts: 36

Location: Brighton, UK

Occupation: Photographer

  • Send private message

18

Thursday, February 18th 2010, 1:29pm

Hi everyone



I've had the same issue with video not always displaying what format video is everyone else using as I have probs with mpeg4 but .flv seem to load every time *g*

nick

Beginner

Posts: 3

Location: Bielefeld

  • Send private message

19

Thursday, March 11th 2010, 12:56pm

path problems

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?

thanks a lot for the wonderful player!
nils

20

Saturday, March 20th 2010, 9:12pm

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