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.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

1

Sunday, April 22nd 2012, 3:34pm

reaction speed soundinterface ipad

Hi,

i'm working on this rather nice ipad interface, old pics in a new coat we say in holland ;-)
And i like the buttons to play a short click sound when ondown.

But the reaction of the soundinterface or the ipad (ipad 3 here) is very slow so it makes no sence.

I was wondering if there is a way to tackle this delay...

Also rootpath is not working on soundinterface.js..

So i made a quick clean example..

http://virtualtuur.com/krpano/audio/

- the duck is just playing the sound but with to much delay... (can that be better?)
- the bird has the rootpath not working..


I hope somebodey has some advice here..

Cheers

Tuur *thumbsup*

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Sunday, April 22nd 2012, 4:42pm

http://virtualtuur.com/krpano/audio/sound_menu2.mp3
NOT FOUND
Your other once is found and working at
http://virtualtuur.com/krpano/audio/audio/sound_menu2.mp3

rootpath adds a path prefix. You have audio for the root path and again audio in the mp3 path and somehow you've uploaded it to audio/audio so it works..

If you want them to play quickly, just preload all the assets first.

Use the developer/inspect element, resources tab, and view source in chrome for xml issues.

I think you probably just need some nice sleep! ;-)
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Sunday, April 22nd 2012, 6:53pm

He he no you didn't undrstand the example ;)

The error is because, and to show, the rootpath doesn't work on ipad.
and the error you show is desktop error... on ipad it works fine :-?

So the duck has rootpath audio/. And also full relative path.. That works. Also without rootpath.
The bird has just the sound file and has to use the rootpath. And don't work.
To make it clear in call the audio map; sounds.
the link is now: http://virtualtuur.com/krpano/sounds/

So all sounds are here:
Virtualtuur.com/krpano/sounds/audio

The rootpath is audio. Relative to the xml.

The result is still the same...

Xml:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<plugin name="btn_duck" url="../skin/duck.png" 
		keep="true" visible="true" 
		align="center" x="0" y="-20" 
		ondown="playsound_menu1();"
/>

<plugin name="btn_twit" url="../skin/twit_bird.png" 
		keep="true" visible="true" 
		align="center" x="200" y="-80" 
		ondown="playsound_menu2();"
		
/>

<action name="preload">

preloadsound(audio/sound_menu.mp3);
preloadsound(audio/sound_menu2.mp3);

</action>


<action name="playsound_menu1">
 playsound(sound_menu1, audio/sound_menu.mp3,1);
</action>

<action name="playsound_menu2">
 playsound(sound_menu2, sound_menu2.mp3,1);
</action>

<plugin name="soundinterface"
        url="soundinterface.swf"
        alturl="soundinterface.js"
        preload="true"
		rootpath="audio/"
        volume="0.6"
        mute="false"
		onloaded="preload();"
        />

So u say preload all.. I preload the sound interface... But should i give every sound his own soundinterface to preload all sounds?

so i did a preload now onloaded... still slowwww reaction..

ondesktop it works just the otherway around. there the bird does work and the duck gives an error.. because on desktop the rootpath works.

so when i take out the rootpath it will all work but... Too Slow..
is that normal on ipad? i want to give my buttons a sound when ondown..
Preload seems to make no difference at all..

*confused* *confused*

Tuur *thumbsup*

This post has been edited 7 times, last edit by "Tuur" (Apr 22nd 2012, 7:32pm)


Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Sunday, April 22nd 2012, 7:52pm

I see. Looks like rootpath is not supported in the JS version.
I seem to remember just forgetting about this attribute and using %swfpath% or absolute paths for my audio.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

5

Sunday, April 22nd 2012, 7:57pm

yeah i saw that post this morning... but i was wondering if i can trigger a sound at the moment you touch teh ipad..
so i can give the control buttons a nice click..

would be nice..

it seems that the ipad is checking something every time when to play sound.
The sounds are just 10kb.. and preloaded

Tuur *thumbsup*

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

6

Sunday, April 22nd 2012, 8:15pm

They didn't look preloaded to me. The aren't being downloaded at all / preloaded. That action "preload" may be a reserved name too.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Sunday, April 22nd 2012, 8:49pm

mmm still the same...

xml:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<krpano version="1.0.8" logkey="true" onstart="audiotest();">


<view hlookat="0" vlookat="0" fov="65" maxpixelzoom="1.0" fovmax="100" />

<preview url="../saas_4.tiles/preview.jpg" />



<plugin name="btn_duck" url="../skin/duck.png" 
		keep="true" visible="true" 
		align="center" x="0" y="-20" 
		ondown="playsound_menu1();"
/>

<plugin name="btn_twit" url="../skin/twit_bird.png" 
		keep="true" visible="true" 
		align="center" x="200" y="-80" 
		ondown="playsound_menu2();"
		
/>

<action name="audiotest">

preloadsound(audio/sound_menu.mp3);
preloadsound(audio/sound_menu2.mp3);

</action>


<action name="playsound_menu1">
 playsound(sound_menu1, audio/sound_menu.mp3,1);
</action>

<action name="playsound_menu2">
 playsound(sound_menu2, sound_menu2.mp3,1);
</action>

<plugin name="soundinterface"
        url="soundinterface.swf"
        alturl="soundinterface.js"
        preload="true"
		rootpath="audio/"
        volume="0.6"
        mute="false"
		onloaded="audiotest();"
        />


</krpano>


*confused*

do you or somebody have an example that the sound plays immediately when ondown??

Tuur *thumbsup*

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

8

Sunday, April 22nd 2012, 9:34pm

Looks like rootpath AND preloadsound are not supported on the JS version.

Try a hand built preloader....

Source code

1
2
3
4
5
6
7
8
preload(audio/sound_menu.mp3);
	<action name="preload">
				addplugin(preloader);
				set(plugin[preloader].visible, false);
				set(plugin[preloader].keep, true);
				set(plugin[preloader].onloaded, removeplugin(preloader));
				set(plugin[preloader].url, %1);
</action>
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

9

Monday, April 23rd 2012, 1:06pm

mmm..

seems not to make any difference..

Tuur *thumbsup*

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

10

Monday, April 23rd 2012, 3:24pm

I don't know Tuur.
Flash seems ok.
Javascript seems like it is really slow.
I'm email Klaus.

The preloading worked now though.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

12

Friday, April 27th 2012, 12:28pm

He Klaus,

could you give comment on this an maybe tell if this is gonna change?

Cheers,
Tuur *thumbsup*

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,831

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

14

Friday, May 4th 2012, 5:17pm

Hi,

preloading video or audio is not possible on iOS,
that means the video or audio will be reloaded on every play,

changing that is currently not possible, because that is an iOS limitation,

best regards,
Klaus

15

Wednesday, October 12th 2016, 4:18pm

the onloaded event doesn't work / can't be used when preloading is enabled! *smile*

</plugin></plugin></plugin>

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

16

Wednesday, October 12th 2016, 10:01pm

So Tuur I think there is only one way for you. No click on IOS. One time I also wanted to have fast click but after several hours trying this or that decided not to have it as couldn't get it play fast enough.

Similar threads