You are not logged in.

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

1

Thursday, February 18th 2010, 11:11am

Changing video file in plugin

Hi guys



Just wondering if there is a way to code a change in video want to create a panorama with a remote control at the side to change the channel/video showing on screen can think of a few possibilities perhaps tweening or action call but can't seem to get anything to work yet....



Anyone have any ideas?

*g*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

2

Thursday, February 18th 2010, 11:23am

found the code but seems to be a problem

Hi again sorry found the code so that's that problem however there seems to be a bit of a problem with it



<action name="playothervideo">
hotspot[video].playvideo(othervideo.flv);
</action>



as when the pano loads for the first time the video doesn't seem to want to appear then after a while it does appear and the action works. V strange will try a few things as the action is in the main xml page as have multiple videos in multiple panos will try to put code with single pano xml file instead of main file to see if this makes a difference otherwise if anyone has had any similar issues would love to hear from you. *g*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

3

Thursday, February 18th 2010, 11:41am

found piece of code thats causing it not to work not sure how to change it

Hi again am on a mission with this so have found the piece of code that I think is causing this to happen.

By using the editor and options plugins I kept reloading the pano code as sometimes video loads sometimes not I then compared the two bits of code from the working/displayed video version to the non working one if that makes any sense.



The problem seems to lie with the isvideoready value which on the working version reads isvideoready="true"



and the non working version = isvideoready="false"



I will try and set this manually to see if it works *g*

4

Thursday, February 18th 2010, 12:00pm

Perhaps I don't understant but you will to try

<action name="playothervideo">
set(hotspot[video].videourl, othervideo.flv);
set(hotspot[video].playvideo, othervideo.flv);
</action>

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

5

Thursday, February 18th 2010, 12:01pm

not this action causing problem

Ok have done some testing now and it seems that it might be a problem with the actual videoplayer not the action code as have taken the action code out and still sometimes the video doesn't load.



I have the most recent version of the videoplayer so I know it's not that there must be another issue.



it seems that once the video has played through its normal time it seems to then load ok even though it is initially not viewable I still have some testing to do as the video I'm loading is MP4 I'll try this with a flv to see if I have the same issues at all.



As a workaround am thinking of creating little 321 video that initiallly loads with a loadcomplete function that then loads the first choice of video but would rather not do this.



update ok have tested .flv instead of .mp4 and doesn't seem to be an issue better functionality with this think my workaround will therefore be initial video .flv then subsequently loaded videos can be mp4 like the mp4 codec as can get vids really small with great quality. *thumbup*


*smile*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

6

Thursday, February 18th 2010, 5:01pm

now tour is broken someone help please

Ok so I've put all my vids in I've created my controller everythings wicked but now if I change the channel on the TV I can't then click on a hotspot to move onto the next panorama in the tour.



Also when checking the code using the editor although the video playing has changed nothing seems to changed in the current xml with regard to video filenames.



I am so close with this now
code for this pano is as follows

<krpano version="1.0.8">
<plugin name="editor" url="editor.swf" />
<plugin name="options" url="options.swf" />
<events onloadcomplete="plugin[combobox].selectitem(Upper Lobby);"/>
<view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="30" fovmin="35" fovmax="90" fov="90" hlookat="-37" vlookat="0"/>
<autorotate horizon="0" tofov="90"/>
<action name="looktohome">lookto(-37,0,90);</action>
<preview url="StanmerHousedata/StanmerHouse6/preview.jpg"/>
<image type="CUBE" multires="true" tilesize="937" baseindex="0">
<level tiledimagewidth="1873" tiledimageheight="1873">
<left url="StanmerHousedata/StanmerHouse6/3/1/%v_%u.jpg"/>
<front url="StanmerHousedata/StanmerHouse6/0/1/%v_%u.jpg"/>
<right url="StanmerHousedata/StanmerHouse6/1/1/%v_%u.jpg"/>
<back url="StanmerHousedata/StanmerHouse6/2/1/%v_%u.jpg"/>
<up url="StanmerHousedata/StanmerHouse6/4/1/%v_%u.jpg"/>
<down url="StanmerHousedata/StanmerHouse6/5/1/%v_%u.jpg"/>
</level>
<level tiledimagewidth="937" tiledimageheight="937">
<left url="StanmerHousedata/StanmerHouse6/3/0/%v_%u.jpg"/>
<front url="StanmerHousedata/StanmerHouse6/0/0/%v_%u.jpg"/>
<right url="StanmerHousedata/StanmerHouse6/1/0/%v_%u.jpg"/>
<back url="StanmerHousedata/StanmerHouse6/2/0/%v_%u.jpg"/>
<up url="StanmerHousedata/StanmerHouse6/4/0/%v_%u.jpg"/>
<down url="StanmerHousedata/StanmerHouse6/5/0/%v_%u.jpg"/>
</level>
</image>
<hotspot name="spot0" onclick="set(state,autoratate.enabled);set(autoratate.enabled,false);lookto(48.1008,24.9815,10,smooth(400,20,100));action(load14);lookat(40,0,90);wait(blend);lookto(-112,23,89.99,smooth(100,20,50));set(autoratate.enabled,state);" url="StanmerHousedata/spots/hotspot_ani.swf" ath="408.101" atv="24.9815"/>
<hotspot name="spot1" onclick="set(state,autoratate.enabled);set(autoratate.enabled,false);lookto(-173.345,4.98152,10,smooth(400,20,100));action(load7);lookat(-74,0,90);wait(blend);lookto(-74,0,89.99,smooth(100,20,50));set(autoratate.enabled,state);" url="StanmerHousedata/spots/hotspot_ani.swf" ath="186.655" atv="4.98152"/>
<hotspot name="video1"
url="videoplayer.swf"
videourl="xbox.flv"
distorted="true"
ath="61.790154060495574"
atv="-6.262107757542883"
edge="center"
scale="0.34"
rx="-6"
ry="21"
rz="-0.5817322478362643"
loop="true"
pausedonstart="false"
directionalsound="true"
range="110"
volume="0.7"
onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
onclick="togglepause();"
/>
<plugin name="remote" url="StanmerHousedata/control.png" zorder="2" align="leftbottom" capture="false" x="10" y="10" handcursor="false" keep="false" visible="true"/>
<plugin name="channel1" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="47" y="125" visible="true" crop="0|0|40|40" onovercrop="0|40|40|40" ondowncrop="0|80|40|40" blendmode="screen" onhover="showtext(Xbox Channel,smalltext);" onclick="playvideo(xbox.flv);"/>
<plugin name="channel2" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="82" y="124" visible="true" crop="40|0|40|40" onovercrop="40|40|40|40" ondowncrop="40|80|40|40" blendmode="screen" onhover="showtext(Guiness Channel,smalltext);" onclick="action(load17);"/>
<plugin name="channel3" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="117" y="124" visible="true" crop="80|0|40|40" onovercrop="80|40|40|40" ondowncrop="80|80|40|40" blendmode="screen" onhover="showtext(Guitar Hero Channel,smalltext);" onclick="action(load18);" />
<plugin name="channel4" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="152" y="124" visible="true" crop="120|0|40|40" onovercrop="120|40|40|40" ondowncrop="120|80|40|40" blendmode="screen" onhover="showtext(Coca Cola Channel,smalltext);" onclick="action(load19);" />
<plugin name="channel5" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="81" y="91" visible="true" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" blendmode="screen" onhover="showtext(Virgin Channel,smalltext);" onclick="action(load20);" />
<plugin name="channel6" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="116" y="91" visible="true" crop="200|0|40|40" onovercrop="200|40|40|40" ondowncrop="200|80|40|40" blendmode="screen" onhover="showtext(Timelapse Channel,smalltext);" onclick="action(load21);" />
<plugin name="volup" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="155" y="78" visible="true" crop="240|0|40|40" onovercrop="240|40|40|40" ondowncrop="240|80|40|40" blendmode="screen" onhover="showtext(Turnup Volume,smalltext);" />
<plugin name="voldown" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="155" y="45" visible="true" crop="280|0|40|40" onovercrop="280|40|40|40" ondowncrop="280|80|40|40" blendmode="screen" onhover="showtext(Turndown Volume,smalltext);" />
<plugin name="power" url="StanmerHousedata/buttons.jpg" zorder="6" align="leftbottom" edge="center" keep="false" x="40" y="41" visible="true" crop="320|0|40|40" onovercrop="320|40|40|40" ondowncrop="320|80|40|40" blendmode="screen" onhover="showtext(Power,smalltext);" />
<action name="load16">
hotspot[video1].playvideo(xbox.flv);
</action>
<action name="load17">
hotspot[video1].playvideo(guiness2.mp4);
</action>
<action name="load18">
hotspot[video1].playvideo(Guitarhero_1.mp4);
</action>
<action name="load19">
hotspot[video1].playvideo(cocacola_1.mp4);
</action>
<action name="load20">
hotspot[video1].playvideo(virgin.mp4);
</action>
<action name="load21">
hotspot[video1].playvideo(stanmerwidenew1.flv);
</action>

</krpano>

7

Monday, February 22nd 2010, 5:42pm

Hi,

Quoted

if I change the channel on the TV I can't then click on a hotspot to move onto the next panorama in the tour.

you are calling a "load14" action on the hotspot,
was it declared? in the posted xml it is not included....

Quoted

Also when checking the code using the editor although the video playing has changed nothing seems to changed in the current xml with regard to video filenames.

the xml itself will be not be updated on the playvideo() call,

beside of this - there are small errors in the code:
e.g. here:

Source code

1
set(state,autoratate.enabled);

the correct name is "autorotate",

and to copy the value of "autorotate.enabled" to "state" - copy(var1,var2) - or - set(var1,get(var2)) must be used,
e.g.

Source code

1
set(state,get(autorotate.enabled));


best regards,
Klaus

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

8

Tuesday, February 23rd 2010, 12:05pm

Hi Klaus Thank you for getting back to me



The Load14 code is within the main XML file, the code posted was part of the xml code for one of the panoramas.



All load14 does is run the loadpano command for a particular panorama.

I have substituted the load 14 command with the loadpano command to test but to no avail the loadpano function simply doesn't work once the playvideo() call has run.

The autorotate code was generated automatically with that error as I am using autopano giga tour and it seems to output that spelling mistake I'm not sure why. I don't in fact use this bit of code I just haven't got round to removing it. Appologies if it adds to the confusion.

The main problem I'm having is that the playvideo() call seems to stop the loadpano call from functioning I have even tried placing breakall and stop commands in various places i the code to see if that helps but no joy as yet.

My work around has been to include 6 videos which all load and stop causing the first frame to be paused with the initial loaded video not stopped.

This seems to have other errors associated with it that I have identified in the buglist post.

It would be great if I didn't need all the extra code however and also performance is a little slower due to having to load up 6 videos at once it helps that they are all stopped but still would be better if the playvideo() worked ok.

Of course I understand that this is all Beta still.

But if you do find a solution or have a code section that you find works for this type of action it would be appreciated.

*thumbsup*

9

Wednesday, February 24th 2010, 3:07pm

Hi,

could you show the example online where the loadpano() call doesn't work
after playing a video... that's strange...

best regards,
Klaus

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

10

Monday, March 1st 2010, 3:48pm

Hi Klaus

Sure thing sorry it's been delayed I've had to rewrite the old code for this one didn't take too long would really love it if you can get this to work as the workaround I've used loading all 6 vids is a bit download intensive even though I've heavily compressed all the clips.

the link is

www.zodiacblue.com/Stanmer/test/FlashHouseTour.html

The workaround I've done is at

www.zodiacblue.com/Stanmer/FlashHouseTour.html

If you need Xml files for any of these just let me know

As of writing this the test version was uploading still so haven't tested it yet but it should be up and running aok within the next half hour or so. *thumbsup*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

11

Thursday, March 4th 2010, 4:25pm

Hi Klaus Just wondered if you had the chance to look at this yet

I'm gonna have to change things on my workaround as all 6 vids loading at begining of this pano just uses up to much download time it would be great if they could just load on demand using the playvideo() command without the loadpano command not working.



Cheers

*thumbsup*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

12

Friday, March 5th 2010, 1:15pm

So I've been contstantly on this as I need it to work it seems that I can get the loadpano cmmand to work

loadpano(panoramic1.xml) .... this works

loadpano(panoramic1.xml,null,null,BLEND(1)); .... doesn't work

It seems to be something about the blend command any ideas anyone as I just keep inching closer I can see that finish line on the horizon

*pinch*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

13

Friday, March 5th 2010, 3:36pm

Ok for anyone who might be having the same problem as me or may be likely to until a permanent fix is found the workaround to this involves losing the blend pano effect from the loadpano() command bit of a comprimise but at least things work videos don't all load at once as in previous workaround which reduces processor load and download time significantly.

I did this by applying an if statement to the adjacent loadpanos that if a particular video was playing not the original then load the next pano without the blend effect and bobs your uncle fannys your aunt it works yippeee but still would prefer the blend effect to actually work after running the playvideo() command.

If anyone runs into anything similar finds a more permanent fix etc etc feel free to email me

Cheers

ZB *cool*

ZODIACBLUE

Beginner

  • "ZODIACBLUE" started this thread

Posts: 37

Location: Brighton, UK

Occupation: Photographer

  • Send private message

14

Monday, March 8th 2010, 11:39am

Hi Everyone just installed new verison of krpano and plugins

but this problem still occuring

any updates anyone? *g*
ZB

15

Saturday, March 20th 2010, 9:13pm

Hi,
Hi Everyone just installed new verison of krpano and plugins

but this problem still occuring

any updates anyone?
this was strange security problem of the flashplayer,
it will be fixed in the next release,

best regards,
Klaus

Rodeus

Beginner

Posts: 25

Location: Russian Federation

  • Send private message

16

Tuesday, November 23rd 2010, 5:02pm


Source code

1
set(state,autoratate.enabled);

the correct name is "autorotate",


I saw this bug in Autopano Tour.
Livepano.ru