Results 1 to 5 of 5

Thread: How to rewind Ext.audio?

  1. #1

    Default Answered: How to rewind Ext.audio?

    The default behavior is to rewind the bell when it is finished playing, but I don't see a way to manually rewind the sound to the beginning in order to play it again before it's finished. So calling play before the sound finishes does nothing.

    I know this is implemented in the HTML5 <audio>, so what's the best way to do this? Just set the currentTime attribute on the audio myself? I don't want to break the Audio.js code...

    Thanks!

  2. That's just a documentation issue, Ext.Audio extends Ext.Media which has the setCurrentTime: http://docs.sencha.com/touch/2.4/2.4...setCurrentTime

  3. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    Ext.Audio has a setCurrentTime method which then sets the currentTime onto the actual <audio> node.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3

    Default

    I'm not seeing that in the touch 2.4.1 api docs:

    http://docs-origin.sencha.com/touch/.../api/Ext.Audio

  5. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    That's just a documentation issue, Ext.Audio extends Ext.Media which has the setCurrentTime: http://docs.sencha.com/touch/2.4/2.4...setCurrentTime
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  6. #5

    Default

    Ah very good. It looks like that method isn't documented in the Media class either.

    Thanks!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •