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.

karlo

Beginner

  • "karlo" started this thread

Posts: 4

Location: Latvia

Occupation: Photographer

  • Send private message

1

Thursday, June 12th 2014, 7:26pm

Sound controls (Play/Pause/Resume button + Volume slider)

Hi,

I'm a beginner with krpano and I'd like to share my first tinkering with code.
This is my version of sound controls: http://panooza.com/karlo/krpano/sound-controls/
xml: http://panooza.com/karlo/krpano/sound-co…nd-controls.xml

I was developing/testing only on chrome+flash.

And I was inspired by http://www.krpano.com/forum/wbb/index.ph…d&threadID=2218
and http://krpano.com/examples/117/examples/…bes/slider.html

It's far from perfect, but I learned a lot.

Any suggestions on how to improve it?

2

Saturday, June 14th 2014, 5:38pm

Hi,

great work!
There is nothing to improve there

Best regards,
Klaus

karlo

Beginner

  • "karlo" started this thread

Posts: 4

Location: Latvia

Occupation: Photographer

  • Send private message

3

Sunday, June 15th 2014, 1:28pm

Plugin position problem

Hi,

There is a strange plugin position problem. Maybe somebody can explain why this happens?
The problem is that in Chrome and IE, the position of the slider grip and red indicator are as they should be, but in Firefox they render shifted 1px.



andrew22222

Intermediate

Posts: 397

Location: Australia

  • Send private message

4

Monday, June 16th 2014, 2:36pm

Hi Karlo,

I wanted to ask how you would adapt your controls to play multiple sounds? At the moment the code is for one scene only but in tours there are generally many different scenes. Some scenes may require no sound and some may need their own individual sound that would be on an endless loop.

Other than that it's a fantastic piece of coding and I'm sure most people here would like the opportunity to use it if you allow that or have it for sale?

You really a beginner? *whistling*

Thanks,

Andrew

karlo

Beginner

  • "karlo" started this thread

Posts: 4

Location: Latvia

Occupation: Photographer

  • Send private message

5

Tuesday, June 17th 2014, 9:06pm

Hi,

Unfortunately, I don't have time at the moment to modify code, but I think the right direction would be to modify "playsound(sound1, mp3filetoplay.mp3, ..." to take arguments "playsound(%1, %2, ..." etc. I don't know if it's correct approach, but that's how I would start to think.. as I said I'm new to krpano coding.

karlo

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

6

Wednesday, June 18th 2014, 12:52am

Very nice. If you are beginner and already so creative I can't wait you to become expert *thumbsup*. Community needs examples like this to be even better.

7

Wednesday, June 18th 2014, 11:13am

Hi,
There is a strange plugin position problem. Maybe somebody can explain why this happens?
The problem is that in Chrome and IE, the position of the slider grip and red indicator are as they should be, but in Firefox they render shifted 1px.
That looks like a subpixel positioning problem.
I will look at it.

Best regards,
Klaus

8

Monday, June 23rd 2014, 2:12pm

Hi,

I'm a beginner with krpano and I'd like to share my first tinkering with code.
This is my version of sound controls: http://panooza.com/karlo/krpano/sound-controls/
xml: http://panooza.com/karlo/krpano/sound-co…nd-controls.xml

I was developing/testing only on chrome+flash.

And I was inspired by http://www.krpano.com/forum/wbb/index.ph…d&threadID=2218
and http://krpano.com/examples/117/examples/…bes/slider.html

It's far from perfect, but I learned a lot.

Any suggestions on how to improve it?


How will i apply this code to control my 360 video volume.

9

Tuesday, June 24th 2014, 11:43am

Hi,
There is a strange plugin position problem. Maybe somebody can explain why this happens?
The problem is that in Chrome and IE, the position of the slider grip and red indicator are as they should be, but in Firefox they render shifted 1px.
That problem is about Flash (correct) and HTML5 (wrong) and related to a different position rounding - this will be fixed in the next release.

A workaround for the moment would be changing the slider image height to an even-size - e.g. the 21px to 22px.
Due the edge=left alignment there will be internally a vertically offset from '21/2 = 10.5px' and the rounding from the 10.5 value to full pixels and how that rounded size is passed to the children elements is currently different in Flash and HTML5 in this situation.

Best regards,
Klaus

andrew22222

Intermediate

Posts: 397

Location: Australia

  • Send private message

10

Wednesday, June 25th 2014, 7:13am

Is there any way this can be adjusted to work on an iPad? I test on iPad Air (with latest update) and everything is there and the slider moves but no volume control. Just the option to have the sound on or off. Seems a shame as it's the perfect solution.

I tested it on desktop Chrome with no flash installed so it's html5 and the volume controls works fine.

What evil little gremlins could be at work in an iPad air to prevent volume control?

Thanks

11

Thursday, June 26th 2014, 7:19am

thanks for your share!

12

Thursday, June 26th 2014, 8:30am

Hi,
Is there any way this can be adjusted to work on an iPad?
No, please see the iOS notes here:
http://krpano.com/plugins/soundinterface/#html5

Apple doesn't 'allow' changing the volume by script (only via the device buttons) - and when Apple doesn't allow that, then there is no way doing it anyway .

Best regards,
Klaus

andrew22222

Intermediate

Posts: 397

Location: Australia

  • Send private message

13

Thursday, June 26th 2014, 10:03am

My apologies. I didn't know about not being able to change the volume. What an odd thing to block. I only use my 'highly restricted' ipad air for testing and use a laptop/desktop for everything else in the digital world *g*

14

Wednesday, January 7th 2015, 5:34pm

Hello to everyone!

thanks to Karlo for kindly sharing his code.

I managed to replicate with my picture and audiofile a pano with an audio and its button/volume control, by using "MAKE PANO (NORMAL) droplet.bat" and by modifying the xml code.

Now my question is: how could I get a title/heading to my pano (as I could get with a vtour), and possibily how could I get a text suggesting that the audio file is actually an audioguide explaining the pano?

Thanks for your help! :-)

15

Thursday, January 8th 2015, 7:21am

thanks for your share!

16

Wednesday, April 1st 2015, 10:34pm

some more feature

Hi,

First of all Karlo thanks for your work!

I used it in my project and I did some change, and I would like share it with others.

So in my project I have multiple sound spots, now I can start the playback via parameters.
I am not a programmer, so my code should be better, but working...

so the sound interface xml (should be included to the main xml):sound_param.xml

In my main xml I have this

Source code

1
<action name="startup"> set(activesound, none); 	</action>



And this is my hotspot example:


Source code

1
<hotspot name="hs09_9_sound"				style="myhotspotstyle"				url="img/sound.png"				edge="lefttop"				ath="175"				atv="28"				onclick="onclickA();"				onclickA="					if( activesound !== name,						set(hotspot[get(activesound)].onclick,onclickA());					);					play_sound_1(sound1, mysound.mp3,get(name));					set(hotspot[get(name)].onclick,onclickB()); 					"				onclickB="pause_sound_1(sound1);set(hotspot[get(name)].onclick,onclickA());"										   								>	</hotspot>



where "sound1" param should be different for every hotspot.

You can change between the spots ( active sound will stop, onclick behavior will set back to default), volume controll will work with the active sound.
I hope I didn't forget anything.

Regards
I.

andregonweb

Beginner

Posts: 1

Location: South Africa

Occupation: 3d Designer

  • Send private message

17

Thursday, July 23rd 2015, 10:07am

Regarding your sound design and a missing image

Hi,

I'm a beginner with krpano and I'd like to share my first tinkering with code.
This is my version of sound controls: http://panooza.com/karlo/krpano/sound-controls/
xml: http://panooza.com/karlo/krpano/sound-co…nd-controls.xml

I was developing/testing only on chrome+flash.

And I was inspired by http://www.krpano.com/forum/wbb/index.ph…d&threadID=2218
and http://krpano.com/examples/117/examples/…bes/slider.html

It's far from perfect, but I learned a lot.

Any suggestions on how to improve it?

Inspired work!

I would however like to ask you whether you could post your original "audio-control-icons.png" image that you used.

herrpedro

Intermediate

Posts: 210

Location: Lisbon

Occupation: Programmer/analyst

  • Send private message

20

Sunday, August 16th 2015, 3:33pm

*thumbsup*
very very nice, ty