Comments (6)
Aha! Did this event miss the README? Some of the events previously I had not written in the docs, and had just used them myself. I'll have to update that.
Glad you like the lib!
from waveform-playlist.
Yeah, that's right. May be it could be a future feature to add.
For now you can change the track volume by changing the gain property on a track object: playlist.tracks[0].gain = 0.2
but you will need to restart the player ( click play/pause ) so that it can be taken into acount.
from waveform-playlist.
@Willena Awesome, thanks!
Yup, from my explorations that was the only way to get it to update the track gain. Will roll with that for now, but it would be super cool to update in real-time the same way the master settings can be emitted and changed
from waveform-playlist.
@Willena Actually, it IS possible!
Just looked into the src:
https://github.com/naomiaro/waveform-playlist/blob/master/src/Playlist.js#L218
and in my code I did: (sorry its contextual, but i basically just get the track
object I'm interested in and pass that into the emit function parameters.
function setGain(trackID, gain) {
const track = getTrackByID(trackID);
playlist.ee.emit("volumechange", gain * 100, track);
}
no need for the play/pause
dance!
from waveform-playlist.
@naomiaro All good, I should have looked in the src
right away! Super clean and easy to see whats going on once you take the plunge.
I might have a few more questions in the following days, but this is great and does what I need it re: gain setting of tracks, so I'll close this! (Unless you want to keep it open until you update the docs)
Cheers!
from waveform-playlist.
Yeah I'll close it when I update the docs, @alexander-daniel thanks!
from waveform-playlist.
Related Issues (20)
- Tracks with sample rate different from the default are rendered incorrectly
- Setup with NEXT.js gives SyntaxError: Cannot use import statement outside a module HOT 3
- Sound is not audible after smaller length audio is finished in nextJS app HOT 2
- TypeError: Cannot read properties of undefined (reading 'disconnect') HOT 2
- Unable to drag annotations when automatic scroll is enabled
- Can't drag/re-position audio clips in example on mobile Chrome HOT 1
- Set specific zoom level programmatically
- Authorization header with audio URL HOT 1
- Trim event and Remove track event don't adjust the session duration
- FR: optional Tempo markers and snap selection HOT 2
- Add preloaded peak files
- Move Back/forward tracks HOT 1
- Incorrect behavior in `play(startTime, endTime)` when `startTime == 0`
- how to create VU meter with playlist data
- Memory leak on mobile devices HOT 1
- Use extendable-media-recorder
- Problem with left and right reversed on wav file created. HOT 1
- Pause event does not include pause state
- WARNING: Code at NPM or UNPKG is not up to date with latest branch!
- Add empty track and start record after
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 waveform-playlist.