Problem Description
I am facing a strange error , if I run it with chrome android browser using wifi , then whenever i switch the windows suddenly it lost the sounds. I am running music behind the application which runs fine but other sounds stop working if i switch the windows. I thought maybe this error is due to the chrome browser so i have build it with crosswalk on XDK and then i ran the application directly on the device. In start everything works fine but if i do not touch the screen and device mode goes into sleep mode then if i wake up the device it get lost all sounds of the buttons except music. So it seems like this is coming from construct2 because running the app on chrome android browser or running as an apk both gives same results.
Attach a Capx
https://dl.dropboxusercontent.com/u/104 ... 0game.capx
Description of Capx
This is basic application sample space blaster which comes with construct2, i did not change anything in its default code. It runs background music and audio sounds.
Steps to Reproduce Bug
- Step 1 : Run the application on wifi and open the chrome browser inside android
- Step 2 : All sound and music will work fine , now start switching your window.
- Step 3 : Then switch back to your game window and you will find the music is still running but it lost the object sounds.
- Step4: Now close the game and restart it in order to hear proper sounds.
- Step5: This time start the game again and just leave the screen without any touch.
- Step6: You will see the sound is gone again just music is playing.
- Step7: This situation happend randomly sometime if you press two or three times in order to produce this error.
Observed Result
I have tested with remote debugging of chrome from my computer and found following errors occours before i lose audio sounds.
call.preview.js:1021
Uncaught (in promise) DOMException: A call to lockOrientation() or unlockOrientation() canceled this
[/code:2db9u2ea]
[code:2db9u2ea]
Uncaught (in promise) DOMException: A call to lockOrientation() or unlockOrientation() canceled this call.Runtime.tryLockOrientation @ preview.js:1021
Runtime.initRendererAndLoader @ preview.js:739
Runtime.loadProject @ preview.js:1655
xhr.onload @ preview.js:410
[/code:2db9u2ea]
[img="https://dl.dropboxusercontent.com/u/104183650/error1.png"]
[b]Expected Result[/b]
It should not lose its sounds if i would switch the game in middle , music stays fine but it lost the sound clicks and effects.
[b]Affected Browsers[/b]
[ul]
[li] Chrome: (YES) [/li][/ul]
[b]Operating System and Service Pack[/b]
Android OS Lollipop
Nexus 5
android version 5.1
[b]Construct 2 Version ID[/b]
Release 216
@Ashley