Comments (6)
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.
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.
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.
I've updated the README a bit for clarity
from adapt-audio.
@oghmios can I close this off now?
from adapt-audio.
Yes, thank you for all
from adapt-audio.
Related Issues (9)
- Autoplay and autostop HOT 5
- Extension not loading correctly HOT 1
- Problems with the feedback description HOT 3
- update README for compatibility with latest version of Adapt
- needs updating to work with Adapt v3
- needs to support the media:stop event
- Can provide a properties.schema for uploading this plugin to adapt authoring tool 0.10.5 & adapt framework 5.7.0? HOT 1
- Redundant? HOT 1
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 adapt-audio.