For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 12 replies, 3 voices, and was last updated 13 years ago by
adikate.
-
AuthorPosts
-
adikateMemberI want to design an app with background music running on all the screens i had. In mobione design centre there is audio icon when i drag that to design an app its showing the play button but i need it be hidden so that the music play when app is started.
November 18, 2012 at 7:50 pm #332433
support-octavioMemberHi adikate,
This example should be helpful for you: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=2123
Let us know if you have problem to implement it in your app.
November 19, 2012 at 9:34 am #332453
adikateMemberi downloaded the file that u gave in reply but of no use. when i click on play no music is heard…can u please give me more detailed information on adding background music
November 19, 2012 at 5:31 pm #332465
support-octavioMemberStep #3 states that you need to change the URL of your mp3 to get it working. Also if you rename the project you should change the buttonId variable
November 20, 2012 at 9:42 am #332493
adikateMemberOctavio is it possible to use mp3 files which are in my computer or this example is only limited to url.
November 20, 2012 at 10:43 am #332497
support-octavioMemberYes, you can use other mp3 file. Just add it as Additional Project File and use a relative url to change the src in the javascript code. i.e. if your mp3 name is mymusic.mp3, after you add it as Additional Project File set the src of mp3 file: “mymusic.mp3”. Let me know how it goes for you.
November 20, 2012 at 11:16 am #332498
adikateMemberOctavio if the file is in G folder and mymusic files(i.e., G:\mymusic) how can i do it as a relative url. i added a file like what u said in reply but i cant do nothing. plz help me with this…
November 20, 2012 at 11:52 am #332502
support-octavioMemberI suspect that it’s not working because you’re testing on Test Center, note that it doesn’t support audio/video playback, you should test the generated files on desktop browser.
November 24, 2012 at 8:41 am #332625
adikateMemberhey Octavio everything is working fine but there is an error in dom inspector and debugger. can i know what might be the cause for the error…
Attachments:
You must be logged in to view attached files.November 24, 2012 at 11:12 pm #332644
support-michaelKeymasterSee Octavio’s previous response in this thread where he states that <audio> tag is not implemented in the Test Center emulator.
November 25, 2012 at 12:08 pm #332654
adikateMemberi thank the support team for all their support. i got a 10 second mp3 file which i named as mymusic.mp3 and in the code i updated the audio.src = mymusic.mp3 and also added as additional project file. now my doubt is how to play this 10 second mp3 file continuously(repeated) as long as user is playing the game. i tested with 10 second and 5 minute mp3 files but all are playing only once and button is still showing STOP even though the mp3 file is finished, can u please help me with this….
November 26, 2012 at 11:22 am #332699
support-octavioMemberYou can add the loop attr with next snippet:
audio.loop = "loop";Add it after set the src attr:
audio = new Audio();
audio.src = ‘myaudio-file.mp3’;
audio.loop = “loop”;
isPlaying = false;December 1, 2012 at 12:42 pm #332943
adikateMemberhello Octavio, i tested on my iphone every thing is working fine but when i press the home button the app closes and the background music also stopped. when i press again my app icon the music is not playing and also the play/stop button is not updated i.e., its still in stop as it needs to be in play….please help me with this
-
AuthorPosts
