Sie sind nicht angemeldet.

161

Freitag, 25. August 2017, 19:42

Multiple scenes in tour

Hi, I am not very technical but I am very close to solving my problem just need a bit more help please! I have spent so many hours *cursing* on this that I just don't know what to do, but I think for everyone here it will be simple.

I have a menu screen with 3 different scenes which you can enter when you click/gaze.

For each scene I have this audio plugin, which I want a different sound to load when the new scene is opened.

In the main .xml file I need to put something like:

<scene name="scene_1" ... onstart="playHtml5sound2D(keep, name,
audiofile, rate*, volume*,loops*, onload*,
onplay*,onpause*,onstop*,onmute*, oncomplete*);" ...>
[...]
</scene>



but I don't really understand this format. What does the "..." mean in that code? I don't understand what to put for "name" because I have just "Commentary1" as the name of the audio for scene 1 - do I put that? But then in the "audiofile" part I need to put audiofile="assets/Commentary1"?


Can someone please just help me to understand how to write the line of code so that for scene 1, Commentary1 loads. For scene 2, Commentary2 loads up etc.


Thank you so much.


Here is my attempt at the code is this correct:


<scene name="scene_1" onstart="playHtml5sound2D(keep="true", name="Commentary1",
audiofile="assets/Commentary1", rate="1.0", volume="1.0",loops="false">
</scene>

<scene name="scene_2" onstart="playHtml5sound2D(keep="true", name="Commentary2",
audiofile="assets/Commentary2", rate="1.0", volume="1.0",loops="false">
</scene>



but it loads up an xml parsing error.


Can someone please help me here?

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 629

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : VR solutions

  • Nachricht senden

162

Freitag, 25. August 2017, 21:03

Hi,

I think it is worthwhile to study the basic krpano syntax. *g*

In your example basically use a onstart action. Krpano droplet creates a scene segments in your tour.xml code. Each panorama has its own 'scene' section.

Quellcode

1
2
3
4
5
6
7
8
9
<scene name="scene_one" title="scene one" onstart="" havevrimage="true" thumburl="panos/one.tiles/thumb.jpg" lat="" lng="" heading=""> 		
        <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
	<preview url="panos/one.tiles/preview.jpg" />
	<image type="CUBE">		
                <cube url="panos/one.tiles/vr/pano_%s.jpg" />	
        </image>

	<!-- place your scene hotspots here -->
</scene>



onstart="" action in each scene where you can enter the action you want to run at start of this scene eg:
onstart="trace('Scene ONE')" or onstart="lookto(20,20,54)"

or

onstart="playHtml5sound2D(true, commentary1, assets/Commentary1, 1.0, 1.0, false);"

In this example sound2d will start. Look here

So whole XML scene section it looks like this:

Quellcode

1
2
3
4
5
6
7
8
<scene name="scene_one" title="scene one" onstart="playHtml5sound2D(true, commentary1, assets/Commentary1, 1.0, 1.0, false);" havevrimage="true" thumburl="panos/one.tiles/thumb.jpg" lat="" lng="" heading=""> <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/one.tiles/preview.jpg" />
<image type="CUBE">	
<cube url="panos/one.tiles/vr/pano_%s.jpg" />	
</image>

<!-- place your scene hotspots here -->
</scene>


Remember that each scene will be unique and you can not write a specific example *squint*


Kind regards
Piotr




Pawel & Piotr

Virtual Tour Builder new HTML5 IDE Virtual Tours builder - free modern templates, POI system and Livepano Assistance and multi Floorplans

HTML5-VR Audio Plugin

New Lensflare Plugin for Flash, HTML5, WebVR!

163

Sonntag, 27. August 2017, 11:30

Hi Piotr!

Thanks again for your help, really appreciate it.

I tried it and it works.

However, (and this is another question for you and people on this forum) it works perfectly in Android but on iPhone is an issue. On iPhone when you load the tour, the audio on the scenes does not play automatically. You have to look at the hotspot to play the audio and then when you close the hotspot the audio stops, which is not how it should work. The audio, just like it does in Android, should load up automatically when you visit each of the scenes in Ireland.


Does anyone here have an android and apple device that they can check this on please?

The link is here: http://cliffs2.linguapracticavr.com

Many thanks, once I've fixed this then I will leave you all in peace :D

164

Freitag, 1. September 2017, 09:03

Fade effects

Hi,

is it yet possible to fade in and out sounds? I did wrote a little routine which rises the volume with a delayedcall in steps, but your plugin does not seem to accept multiple volume settings in a short period of time *unsure*

Best regards,
Nupsi

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 629

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : VR solutions

  • Nachricht senden

165

Freitag, 1. September 2017, 11:30

Thanks again for your help, really appreciate it.

I tried it and it works.
*thumbsup*
However, (and this is another question for you and people on this forum) it works perfectly in Android but on iPhone is an issue. On iPhone when you load the tour, the audio on the scenes does not play automatically. You have to look at the hotspot to play the audio and then when you close the hotspot the audio stops, which is not how it should work. The audio, just like it does in Android, should load up automatically when you visit each of the scenes in Ireland.
This is the IOS...
Add a blank (completely muted) audio sound to your starting panorama:


<scene name="scene_0" title="Menu" onstart="playHtml5sound2D(false, smallSound, html5sound/tiny_audio_file, 0.1, 0,false);" thumburl="panos/Klify-lewa_strona.tiles/thumb.jpg" lat="" lng="" heading="">
[...]
</scene>

Possibly this will help...

p.s. My first language is Polish *smile*

is it yet possible to fade in and out sounds? I did wrote a little routine which rises the volume with a delayedcall in steps, but your plugin does not seem to accept multiple volume settings in a short period of time
Thank you for your suggestion. I will try to add this option in one of the next updates.

Kind regards
Piotr
Pawel & Piotr

Virtual Tour Builder new HTML5 IDE Virtual Tours builder - free modern templates, POI system and Livepano Assistance and multi Floorplans

HTML5-VR Audio Plugin

New Lensflare Plugin for Flash, HTML5, WebVR!

166

Freitag, 1. September 2017, 15:53

Thanks Piotr, great news *thumbsup*

Another question: It seems that the keep-value does´nt work?! No matter if I set it to true or false, the sound does stop when leaving a scene:

playHtml5sound2D(true, testfile, sounds/testfile.mp3, 1,1, true);

works just the same as

playHtml5sound2D(false, testfile, sounds/testfile.mp3, 1,1, true);

Is it working for you to keep a sound over all scenes without starting it in each scene again?

Thanks in advance,
Nupis

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 629

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : VR solutions

  • Nachricht senden

167

Freitag, 1. September 2017, 16:52

Another question: It seems that the keep-value does´nt work?! No matter if I set it to true or false, the sound does stop when leaving a scene:
*wacko* *blink* This is interesting. I'll check it out and let you know.

EDIT: I'm after the tests. Everything works OK. Can you write more about this problem?

BDW - this is wrong syntax!

playHtml5sound2D(true, testfile, sounds/testfile.mp3, 1,1, true);



docu says:
  • audiofile = the path and filename of a sound file without extension

so it will bee that way:

playHtml5sound2D(true, testfile, sounds/testfile, 1,1, true);



Best regards
Piotr
Pawel & Piotr

Virtual Tour Builder new HTML5 IDE Virtual Tours builder - free modern templates, POI system and Livepano Assistance and multi Floorplans

HTML5-VR Audio Plugin

New Lensflare Plugin for Flash, HTML5, WebVR!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »spacerywirtualne« (1. September 2017, 19:34)


168

Samstag, 2. September 2017, 10:11

Hi Piotr,

and thanks for the reply :-)

And of course the syntax is wrong, but it´s not the syntax I actually use, so it´s just wrong in my post. This is the actually syntax I use:

<action name="startsound2d">
playHtml5sound2D(true, %1, sounds/%1, 1, %2, true);
set(audio_%1,1);
</action>

<action name="startsound3d">
playHtml5sound3D(true, %1, sounds/%1, %2, %3, %4, 1, %5, true);
set(audio_%1,1);
</action>


And then I call the actions with
startsound2d(sound2d,1);
startsound3d(sound3d, 25, 18, 360,1);


Which leads finally to:
playHtml5sound2D(true, sound2d, sounds/sound2d, 1, 1, true);
playHtml5sound3D(true, sound3d, sounds/sound3d, 25, 18, 360, 1, 1, true);


Which is 1:1 the same syntax as it is in the docu:
playHtml5sound3D(keep, name, audiofile, ath, atv, range, rate*, volume*, loops*,....

And the sounds starts perfect in each scene but the keep,true-flag is just not working for me. Even not if I put the code directly in the start-event of the scene like this:
playHtml5sound2D(true, sound2d, sounds/sound2d, 1, 1, true);

I´m using krpano 1.19-pr10 and did try your plugin ver.3.0 and 3.01.

Thanks in advance,
Nupsi

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 629

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : VR solutions

  • Nachricht senden

169

Samstag, 2. September 2017, 13:38

Hi Nupsi,

Have you noticed in what conditions do such things happen? On a particular web browser? I can not reproduce this error.

This plugin KEEP based basically on Krpano KEEP. It's nothing new.

Best regards
Piotr
Pawel & Piotr

Virtual Tour Builder new HTML5 IDE Virtual Tours builder - free modern templates, POI system and Livepano Assistance and multi Floorplans

HTML5-VR Audio Plugin

New Lensflare Plugin for Flash, HTML5, WebVR!