Coder Social home page Coder Social logo

Not work for me about adapt-audio HOT 6 CLOSED

oghmios avatar oghmios commented on June 17, 2024
Not work for me

from adapt-audio.

Comments (6)

moloko avatar moloko commented on June 17, 2024

You also need to modify the JavaScript code for the component(s) you want to use the audio extension with, as documented in the Usage section of the README

from adapt-audio.

oghmios avatar oghmios commented on June 17, 2024

I put the code as a README in component's text .js, but it's the same. I need to put inside the function or like a new function?

from adapt-audio.

moloko avatar moloko commented on June 17, 2024

You first need to listen to the click event of the audio controls.

If the component you're adding the controls to has an events hash then you can add this to it:

'click .audio-controls .icon':'onAudioButtonClicked'

(If it doesn't have an events hash you can either add one or use whatever other method of listening to dom events takes your fancy)

You can then add a (new) function like this:

onAudioButtonClicked:function(event) {
    if(event) event.preventDefault();

    Adapt.trigger('audio', event.currentTarget);
}

from adapt-audio.

moloko avatar moloko commented on June 17, 2024

I've updated the README a bit for clarity

from adapt-audio.

moloko avatar moloko commented on June 17, 2024

@oghmios can I close this off now?

from adapt-audio.

oghmios avatar oghmios commented on June 17, 2024

Yes, thank you for all

from adapt-audio.

Related Issues (9)

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.