Comments (4)
Original comment by [email protected]
on 7 Jun 2011 at 11:50
from mobile-web-development-with-phonegap.
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 [email protected]
on 8 Jun 2011 at 12:27
- Added labels: Type-Task
- Removed labels: Type-Defect
from mobile-web-development-with-phonegap.
cool its working
thanks for fast replay
Original comment by [email protected]
on 8 Jun 2011 at 3:18
from mobile-web-development-with-phonegap.
Original comment by [email protected]
on 8 Jun 2011 at 3:49
- Changed state: Done
from mobile-web-development-with-phonegap.
Related Issues (20)
- TMT4 part 1. android doesn't load map HOT 4
- Problem to install MDS HOT 5
- JSLint4Java: Add option to disable out of scope warning HOT 4
- Eclipse jslint plugin can not validate css and html files HOT 3
- Issue in integrating the Twitter HOT 2
- An error occurred while collecting items to be installed HOT 10
- Error instalation - Getting Started with AppLaud HOT 2
- Header zooming disable in phonegap app HOT 2
- errors HOT 1
- update to commons-codec-1.7.jar
- app crashes if menu button is pressed when scanner is open. barcode scanner http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt3 HOT 4
- Issues with TMT51 twitter examples HOT 2
- eclipse find errors in projects with minified js files HOT 1
- An error occurred while collecting items to be installed HOT 3
- Android Adt plugin Unable to install HOT 1
- Plugin Installation Error -Eclipse Helios -MD5 Hash Key HOT 1
- Gettig google not defined
- How to include sencha libraries in a project
- Spelled incorrect HOT 1
- Please Help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-web-development-with-phonegap.