Coder Social home page Coder Social logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024

Original comment by [email protected] on 7 Jun 2011 at 11:50

from mobile-web-development-with-phonegap.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024

Original comment by [email protected] on 8 Jun 2011 at 3:49

  • Changed state: Done

from mobile-web-development-with-phonegap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.