This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
play_an_mp3_audio_stream_in_phonegap [2015/08/03 14:40] Joel Dare |
play_an_mp3_audio_stream_in_phonegap [2015/09/16 18:49] Joel Dare |
||
---|---|---|---|
Line 46: | Line 46: | ||
**Note:** Some users have have had trouble finding the //Sound.m// file. It's not in the XCode project itself. You'll find it beneath your home directory (~) under //~/PhoneGapLib/Classes/// or you can just use Finder to search for //Sound.m//. Right-click on it and open it in XCode. | **Note:** Some users have have had trouble finding the //Sound.m// file. It's not in the XCode project itself. You'll find it beneath your home directory (~) under //~/PhoneGapLib/Classes/// or you can just use Finder to search for //Sound.m//. Right-click on it and open it in XCode. | ||
+ | |||
+ | ====== Other Pause Alternatives ====== | ||
+ | |||
+ | If the pause() command above doesn't work for you, these two lines might work to pause the audio. | ||
+ | |||
+ | myaudio.pause(); | ||
+ | myaudio.currentTime = 0; | ||
+ | |||
+ | If that doesn’t work, another popular suggestion is to set the src to nothing on “pause” and then back to the correct source on play again. | ||
+ | |||
+ | myaudio.src = ""; | ||
====== Working HTML Example ====== | ====== Working HTML Example ====== |