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: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • 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




Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

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: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • 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
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

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: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • 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
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

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: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • 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
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

170

Sonntag, 22. Oktober 2017, 09:05

Hi Piotr,

any news on the possibility to adjust the volume on the fly?

Best regards,
Nupsi

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

171

Sonntag, 22. Oktober 2017, 16:01

Hi
Hi Piotr,

any news on the possibility to adjust the volume on the fly?

You mean more than that?

https://krpano.com/plugins/userplugins/h…tml5Soundvolume

Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

172

Montag, 23. Oktober 2017, 09:23

Hi Piotr,

I need to be able to adjust the volume of all active sounds at once and fully interactive through a volume bar. Like I wrote earlier:
"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."

At the moment your plugin only allows setting the volume of one specific sound and only to a constant value. It´s not possible to change the volume interactively.

Best regards,
Nupsi

173

Samstag, 25. November 2017, 05:02

Hello!

Thanks for the plugin! But there is a question.

How work
playHtml5sound2D (keep, name, audiofile, rate *, volume *, loops*, onload *, onplay *, onpause *, onstop *, onmute *, oncomplete)?

My code:

Quellcode

1
2
3
4
5
6
<scene name="scene_01" title="01" onstart="load_audio_01();" ...>
...
	<action name="load_audio_01">
		playHtml5sound2D(false, a01, html5sound/assets/a01, 1.0, 0.75, false, oncomplete(skin_nextscene(+1)));
	</action>
</scene>


Sound - works.
Do not repeat in another scene.
Each scene has its own sound.

When you manually move to another scene - the sound of the previous one goes out, the sound of the new one turns on.Its OK.

But oncomplete does not work in any way. What needs to be corrected?,
I want after the end of the audio playback - the following scene was loaded

I have tried:
playHtml5sound2D(false, a01, html5sound/assets/a01, 1.0, 0.75, false, oncomplete(skin_nextscene(+1)));
playHtml5sound2D(false, a02, html5sound/assets/a02, 1.0, 0.75, false, oncomplete(loadscene(scene_02)));
playHtml5sound2D(false, a02, html5sound/assets/a02, 1.0, 0.75, false, oncomplete(loadscene(scene_02);));
playHtml5sound2D(false, a02, html5sound/assets/a02, 1.0, 0.75, false, oncomplete(loadscene(scene_02);));
None of the options worked.

174

Samstag, 25. November 2017, 09:53

this is a lack of basic understanding...
1) right now you're setting the onload event, not the oncomplete event!
2) there is no oncomplete(), you must just put your actions into the right slot.
3) you must keep the order of arguments!
* means optional, but if you want to set oncomplete you must set something for the arguments before, too

playHtml5sound2D (keep, name, audiofile, rate *, volume *, loops*, onload *, onplay *, onpause *, onstop *, onmute *, oncomplete*);
-->
playHtml5sound2D(false, a01, html5sound/assets/a01, 1.0, 0.75, false, null, null, null, null, null, skin_nextscene(+1));
--> or maybe
playHtml5sound2D(false, a01, html5sound/assets/a01, 1.0, 0.75, false, , , , , , skin_nextscene(+1));

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (25. November 2017, 10:05)


175

Samstag, 25. November 2017, 10:43

How can you be right!

Thank you so much. It helped.

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

176

Samstag, 25. November 2017, 11:09

At the moment your plugin only allows setting the volume of one specific sound and only to a constant value. It´s not possible to change the volume interactively.
In demo you have sliders for dynamic volume change, so... *huh*

As for global volume setting, I'm working on it.


Kind regards
Piotr
»spacerywirtualne« hat folgendes Bild angehängt:
  • Zrzut ekranu 2017-11-25 11.01.16.png
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

177

Montag, 4. Dezember 2017, 22:01

bug with several panos with different soundtracks

Hello,

i have a pb with the plugin, i use it in a virtual tour, all is ok when i go slowly from a pano ((pano1 with soud1) to another one (pano2 with sound2). My problem appears when i go fastly from pano1 to pano2, and to another...
For example, i have 2 panos: pano1 with sound1, pano2 with sound2
i open pano1 and, before sound1 begins (sometimes it takes a long time to play... it depends on the file?) , then i go directly (click on an arrow or on a thumb) to pano2, sound2 normally begins... but sound1 too! After 3-4 panos i have 3-4 soundtracks playing in the same time ... *cry*
Any idea??
Thank's in advance

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

178

Dienstag, 5. Dezember 2017, 09:28

Hi
i have a pb with the plugin, i use it in a virtual tour, all is ok when i go slowly from a pano ((pano1 with soud1) to another one (pano2 with sound2). My problem appears when i go fastly from pano1 to pano2, and to another...
For example, i have 2 panos: pano1 with sound1, pano2 with sound2
i open pano1 and, before sound1 begins (sometimes it takes a long time to play... it depends on the file?) , then i go directly (click on an arrow or on a thumb) to pano2, sound2 normally begins... but sound1 too! After 3-4 panos i have 3-4 soundtracks playing in the same time ...
Any idea??
Thank's in advance


I guess where the problem is.

Audio files are loaded using the action at the start of a new panorama. Each new panorama brings up new files. If you jump very quickly between the panoramas, the audio files from the first panorama will not be able to be loaded and will be played later.
The speed of loading audio files can depend on many factors:
1. file size
2. internet speed
3. server
I will think about solving this problem, but remember that no one overloads panoramas so quickly. Normally using the project does not cause such problems.


Kind regards
Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

179

Dienstag, 5. Dezember 2017, 13:40

ok thank you Piotr,
just one thing, i 'm not sure you're right when you say that the "normally using" is slowly... i think more and more people go fastly from a pano to another (for example in a game, or because it was the wrong way etc...), for my production it's very important that they can do it without bug.
Thank's again i hope a solution as soon as possible ;-)
ciao

  • »spacerywirtualne« ist der Autor dieses Themas

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

180

Dienstag, 5. Dezember 2017, 15:34

Thank's again i hope a solution as soon as possible
I'm working on it *smile*


kind regards
Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*