Closed GoogleCodeExporter closed 8 years ago
Original comment by paul.beu...@gmail.com
on 7 Jun 2011 at 11:50
Great! Glad to hear of your success. Below I describe what I think you might be
planning (let me know if different).
jQuery multi-pages like: <div data-role="page" id="page-one"> etc in index.html.
Each page has it's own start/stop/pause buttons like:
<div data-role="button" id="playaudio-page-one">Play</div> etc
Then the click event handlers for each pages' play buttons would have a
different id and could define different functions in main.js (like diff. values
for var src):
$("#playaudio-page-one").live('tap click', function() {
var src = 'http://audio.ibeat.org/....mp3';
playAudio(src);
});
// similarly define live(...) for other buttons $("#playaudio-page-two") etc
This is a very basic design for the code. Depending on how your audio files are
organized and chosen, you could probably make the code more efficient than my
example once it's working as you like.
If you'd like the music to start playing automatically when a page is shown,
use the playAudio() function in a handler for the jQuery Mobile "pageshow"
event instead of a button's click event.
Good luck and thanks for the interesting question!
Original comment by libby.ba...@gmail.com
on 8 Jun 2011 at 12:27
cool its working
thanks for fast replay
Original comment by abhijeet...@gmail.com
on 8 Jun 2011 at 3:18
Original comment by libby.ba...@gmail.com
on 8 Jun 2011 at 3:49
Original issue reported on code.google.com by
abhijeet...@gmail.com
on 7 Jun 2011 at 11:41