music doesnt play on webview+

Get help using Construct 2

Post » Sun Mar 15, 2015 4:16 pm

Hi all,

m testing my app on iOS, iphone5 via latest cocoon launcher on Webview+. I export the app from Construct 2 however my music only plays when minimising my app and then again maximize it. The events in C2 are: on start of layout, play music as tag x at volume "sound variable". When testing on desktop, the music plays as intended however when i test on iphone5, the music doesnt play at the begining. Only after minimising and then maximising. Any suggestions?
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Sun Mar 15, 2015 5:20 pm

Is it possible you have to touch the screen first before audio start playing ? :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Mon Mar 16, 2015 7:09 am

lennaert wrote:Is it possible you have to touch the screen first before audio start playing ? :)


I was first thinking the same, but no it doesnt start after any touch :/.
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Mon Mar 16, 2015 10:41 am

Could you try and use an action event for playing the music instead of "on start of layout", something like on click sprite play music etc.

check if it starts playing as soon as you click it then.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Mon Mar 16, 2015 4:21 pm

lennaert wrote:Could you try and use an action event for playing the music instead of "on start of layout", something like on click sprite play music etc.

check if it starts playing as soon as you click it then.



its working weeeeey :) thx
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Mon Mar 16, 2015 5:15 pm

lennaert wrote:Could you try and use an action event for playing the music instead of "on start of layout", something like on click sprite play music etc.

check if it starts playing as soon as you click it then.


Just one more thing - what is the best way to have the music loudness changed during play? I have a variable sfx sound and music sound which is basicaly the volume for the different sound tags. However i dont want to have "every tick" event for the loudness to check. And if i change it to something else, it didnt worked so far...
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Mon Mar 16, 2015 5:25 pm

Just set the volume once when needed, does not need to be every tick.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Tue Mar 17, 2015 8:07 am

lennaert wrote:Just set the volume once when needed, does not need to be every tick.


Looks like the music is only playing at one volume level on mobile. When i test on desktop, everything works fine. Also the SFX volume adjustment works. But when i export it and try on cocoon launcher, the music just plays at one volume ignoring the reduced Db. Im not sure what can cause this...
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Tue Mar 17, 2015 8:39 am

Also everything works fine on Canvas+ but sounds on webview+ behave strangely overal. Do you know by any chance, what is the main difference regarding sounds on Canvas+ and webview+ ?
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Tue Mar 17, 2015 10:30 am

Nope, sorry, I am unaware of the differences.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 11 guests