Video intro - hide PTP controls   [SOLVED] - View the solution

Share your tips and tricks here or get help with any Panotour 2.0+ problem!
No bug reports (of any kind) in this forum!
no avatar
jschrader
Member
 
Topic author
Posts: 282
Likes: 7 posts
Liked in: 3 posts
Joined: Mon Apr 22, 2013 3:51 pm
Info

Video intro - hide PTP controls

by jschrader » Sat Feb 08, 2014 7:39 am

For my project we want to run a full size video intro before the tour starts.
I wrote a code for native krpano video player to run the video in the beginning and when finished calls the start action of the ptp tour.

Wich works fine so far. Only problem is that with the video also the kolormenu and the controlbar are loaded, which shouldn't be visible during the video. Can someone please tell me how to avoid this or how to hide these?

Thanks
Jürgen

User avatar
bdd
Kolor Team
 
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: Video intro - hide PTP controls  [SOLVED]

by bdd » Sat Feb 08, 2014 5:39 pm

jschrader wrote:For my project we want to run a full size video intro before the tour starts.
I wrote a code for native krpano video player to run the video in the beginning and when finished calls the start action of the ptp tour.

Wich works fine so far. Only problem is that with the video also the kolormenu and the controlbar are loaded, which shouldn't be visible during the video. Can someone please tell me how to avoid this or how to hide these?

Thanks
Jürgen



Jürgen,

Open the xxx_core.xml file, and remove the occurences of the "events.dispatch(onTourStart);" .

Then in the action you call after your video is finished, call the 2 following lines :

events.dispatch(onPanoStart);
events.dispatch(onTourStart);

I think those modifications should fit your needs.

Gérald

no avatar
Destiny
Moderator
 
Posts: 7886
Likes: 6 posts
Liked in: 228 posts
Joined: Mon Apr 26, 2010 11:55 pm
Info

Re: Video intro - hide PTP controls

by Destiny » Sun Feb 09, 2014 8:22 am

That's cool Gérald, probably better than mine.. I added a 5 sec movie, at end of play auto goto a Tour..

http://www.destinyvirtualtours.com/PTPV ... -Tour.html

I like the idea of starting with a movie, auto goto a Tour, start auto Tour, at the end auto Tour goto a new movie, auto goto a new Tour etc etc.. ... The movie/s could be of a walk-through of the corridors.. into a new room/Pano or just an intro..

I will give your suggestion a go... =D

Destiny..

no avatar
jschrader
Member
 
Topic author
Posts: 282
Likes: 7 posts
Liked in: 3 posts
Joined: Mon Apr 22, 2013 3:51 pm
Info

Re: Video intro - hide PTP controls

by jschrader » Sun Feb 09, 2014 1:35 pm

Destiny, does that mean you created two tours?
I assumed that because of the flicker between the film and the tour.
Couldn't try Geralds suggestion yet but I guess it's always better to stay inside just one tour.

no avatar
Destiny
Moderator
 
Posts: 7886
Likes: 6 posts
Liked in: 228 posts
Joined: Mon Apr 26, 2010 11:55 pm
Info

Re: Video intro - hide PTP controls

by Destiny » Mon Feb 10, 2014 4:32 am

I did.. There is no way around it in the way I did it.. PTP V2 Website Box , auto closes on open a new plugin, but that does not translate to the the contents of the actuarial Website Box.. So, if I were to add my code to a Tour, it would just keep adding it over the top of another Website Box without closing it.. I have requested this feature since it stops a few media types from working as I want them....

This is a different option I made, a little more complicated since I had to edit the button to auto open the video rather than on click.. The movie player I made auto buffer, and then auto stream play so I had to add a Watcher/Listener and an Action - ‘When’, and ‘If’ and and ‘Action’ - goto.. There is bound to be a bit of a clash on enter a new Tour doing it this way but until I get my feature request, this is as good as it gets.. I guess there would be other ways to do this...

http://www.destinyvirtualtours.com/PTPV ... Movie.html

Destiny

no avatar
jschrader
Member
 
Topic author
Posts: 282
Likes: 7 posts
Liked in: 3 posts
Joined: Mon Apr 22, 2013 3:51 pm
Info

Re: Video intro - hide PTP controls

by jschrader » Mon Feb 10, 2014 6:28 am

The method Gerald gave works just fine, but one has to clear the cache to see the changes.
Also I'm seeing a flicker now when clicking on the menu but that might be due to other changes, will have to check.

no avatar
Destiny
Moderator
 
Posts: 7886
Likes: 6 posts
Liked in: 228 posts
Joined: Mon Apr 26, 2010 11:55 pm
Info

Re: Video intro - hide PTP controls

by Destiny » Mon Feb 10, 2014 7:06 am

Nothing is ever going to be perfect.. But as long as it works, most people would not notice.. Since you are ware of it, you can tinker with it to get it better. I will continue to see how to improve my option.. The fact that the Website Box does not auto close on new media when inside the Website box allows it to continuously add another another another.. I need to find a way to auto close the Website Box contents media... Not sure how else to explain that..

I added Gérald code to this one.. What do you mean by "controls".. I was thinking you meant the menu.. I cannot see any changes so I guess its related to your settings...

Anyway.. here is another test, a single Tour with DeepLinking and some call actions to auto play the video..

http://www.destinyvirtualtours.com/PTPV ... eTour.html

There might be an easy fix to stop it from acting like this.. but as far as I think, IF the Website Box auto closed on new internal media contents, it would be fine.. It probably something stupid I have done.. :lol:

Gérald would probably laugh at how I went about this..

Destiny..

no avatar
rage_zi
Member
 
Posts: 30
Likes: 2 posts
Liked in: 1 post
Joined: Mon Nov 18, 2013 1:42 pm
Info

Re: Video intro - hide PTP controls

by rage_zi » Mon Dec 01, 2014 1:26 pm

Hi All,

I was wondering if were possible to share the code to have a video intro? Not a coder myself and am stuck at the moment trying to figure out how to have a video play as an intro to the project,

thanks in advance

R

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Wed Feb 25, 2015 1:59 pm

Hi,
I was looking for just the same thing. a video intro for my panorama. Can a code be found somewhere for this? or maybe can someone just give me a bit of starting advice (I can code a bit)?

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video intro - hide PTP controls

by benji33 » Wed Feb 25, 2015 2:35 pm

Code depends of code on each project because each project has different options on start which apply different codes into the core xml file.
The idea is to add a videoplayer with or without play on start on the startup action then call the onTourStart event which can be found into the core.xml file only when the video is completed (videoplayer oncomplete event) or closed on click.
Benjamin

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Wed Feb 25, 2015 4:51 pm

Thank you Benjamin for your reply,
just to make sure I understand. you are saying that I should modify the core.xml file directly? not create a plugin?
if I modify the core.xml file I should modify it again every time I build the tour, right? (because the file gets re-written)

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video intro - hide PTP controls

by benji33 » Wed Feb 25, 2015 5:02 pm

Yes. I know it's not the better thing. But have a look on the Splashscreen plugin of Alexander Popov here http://www.kolor.com/wiki-en/action/vie ... nder_Popov perhaps this can help for this kind of work.
Benjamin

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Thu Mar 05, 2015 12:31 pm

Hi again,
I hope i'm not "stealing" this thread, if I am then let me know and I can post a new one.

With the great help from Jürgen I have managed to add a video before the start of the tour (writing code directly in the myTourName.xml) it basically works using the krpano videoplayer plugin http://krpano.com/plugins/videoplayer/?version=118#top.
The problem I have is that it seems I have real buffering issues that I can't solve. the video stutters very bad. If I manually pause the video for a few seconds the buffer gets filled but not enough. Any ideas on this?

I was thinking on a different way to do it, maybe I could play the video from the HTML file I call the tour from? using something like this http://www.w3.org/2010/05/video/mediaevents.html

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video intro - hide PTP controls

by benji33 » Thu Mar 05, 2015 12:54 pm

Not linked to a low bandwith issue ?
Benjamin

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Thu Mar 05, 2015 2:55 pm

I think you are right, I have uploaded to another server and it's much better.
I also increased a bit the buffer time for the videoplayer plugin
Thank you!

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Mon Mar 23, 2015 4:34 am

bdd wrote:Open the xxx_core.xml file, and remove the occurences of the "events.dispatch(onTourStart);" .

Then in the action you call after your video is finished, call the 2 following lines :

events.dispatch(onPanoStart);
events.dispatch(onTourStart);

I think those modifications should fit your needs.

Gérald


OK, so now I'm back at this point. I did remove the two lines from core.xml but the UI of the tour still loads while the movie is playing. anywhere else I should look?

Thanks!
Shai

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video intro - hide PTP controls

by benji33 » Mon Mar 23, 2015 9:32 am

Is it possible to have a look on the tour url ?
Benjamin

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Mon Mar 23, 2015 1:33 pm


no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video intro - hide PTP controls

by benji33 » Mon Mar 23, 2015 3:39 pm

Try with
1. Tour > Start Parameters > Controls > Start tour with hideable controls hidden checked
2. Docked thumbnails & control bar with behavior "Respond to show.hide controls request" checked
3. If these actions are not present into your skin.xml file add them :
Code: Select all
  <!-- Hide / Show Controls -->
  <action name="hideTourControls">set(tour_displaycontrols, false);events.dispatch(hidetourcontrols);</action>
  <action name="showTourControls">set(tour_displaycontrols, true); events.dispatch(showtourcontrols);</action>

3. Then into your "hideskip" button action add this call :
Code: Select all
showTourControls();
Benjamin

User avatar
shais
Member
 
Posts: 86
Likes: 2 posts
Liked in: 3 posts
Joined: Mon Oct 28, 2013 10:17 am
Info

Re: Video intro - hide PTP controls

by shais » Mon Mar 23, 2015 7:54 pm

Thanks,
Now The UI is hidden but it doesn't show. I have tried puting the showTourControls(); on the pause action of the video and the controlls do show up. but as soon as the video ends (or skipped) the controlls dissapear. I thought maybe to put the showTourControls(); when the first panorama loads, but I can't find where I should put it

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Video intro - hide PTP controls

by benji33 » Wed Mar 25, 2015 1:26 pm

Try to add showTourControls(); call into the first start scene tag
Code: Select all
<scene name="SCENE_NAME" ... onstart="showTourControls();" ... >
...
</scene>
Benjamin


Who is online

Users browsing this forum: No registered users and 4 guests