mediamonks / channels Goto Github PK
View Code? Open in Web Editor NEWChannel-based sound player for the web.
License: MIT License
Channel-based sound player for the web.
License: MIT License
Built files that no longer exist are currently not removed
Currently all on the main instance, which results in that you have to check if it's an event that you are interested in (see if event.target
is the one you are dealing with).
Probably move these events (volume, panning changes) to the place that is affected (the channel, for example)
Not sure yet about a new name. Bus
?
Was named like this because was primarily about volume (contains gain nodes) but now it contains:
Related renames:
To repos in package.json, also some images in readme
They can currently only be connected.
Currently they are only inserted pre-volume
There are a lof of gain nodes now (3 for each sound for example), would be beneficial if you could choose to not have them being created.
Probably needs to be done in the SampleManager
Users should be able to use effects, probably by setting them on a VolumeNodes
instance. This will allow for effect to be set on channels and the main output.
At the moment, everything is done manually:
Please add eslint to the repository.
npm i --save-dev @mediamonks/eslint-config @mediamonks/eslint-config-typescript
Add the following configuration to the package.json
"eslintConfig": {
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"@mediamonks/eslint-config",
"@mediamonks/eslint-config-typescript",
]
}
]
},
Not yet sure what the desired behaviour should be.
Use case: the output of an audio or video element should be connectable to Channels
.
Children is now typed as ReactNode
, should become ReactNode | (channelsInstance:Channels) => ReactNode
Install the @mediamonks/prettier-config dependency.
npm i --save-dev @mediamonks/prettier-config
Configure the prettier config in the package.json
"prettier": "@mediamonks/prettier-config",
These are now a combination of props for play()
and stop()
but not all of these make sense to use in that context (effects for example).
Use of events has not been described yet
Play/stop props can be set on the play/stop methods, but also be inherited from the channel a sound is playing on.
Not sure yet how this should work, should there be a difference in a (non-looped) sound ending and a sound being stopped?
Not sure at what moments. Pushing and publishing?
Unclear how this should behave.
Readme should have an image explaining the audio routing (main output, channels, effects).
Dependency for @mediamonks/channels
is currently set to *
(was changed due to some dep conflicts), but should be properly set.
It's now the 3rd param, can be a prop in 2nd one
channelsInstance.createChannel(
'background-music',
null,
{ fadeInTime: 2, fadeOutTime: 2, loop: true }
);
Right now, channels
is built when publishing use-channels
(otherwise the use-channels
tests fail). Probably better to check out the referenced channels
version to tests against that (or maybe even every valid version in semver range?)
Some methods (on main instance) accept a channel: string | Channel
param but the Channel
part is a bit useless, since if you have the reference you can probably do it easier by calling a similar method on that reference.
Currently, playing sounds can have fadeOutTime
set on the channel they are playing on. This for example affects the stopAll
command, which should not be the case.
There probably should be an overrideFadeOuts
or immediate
(which defaults to true
) param on the stopAll
method, but not sure if there are more places where adjustments are needed.
Seems like a useless prop, since you can set initialVolume
to 0
.
Also: rename initialVolume
to volume
Currently the main Channels instance is used in that case.
Plural is misleading. Probably effectsChain
"These SignalModifiers exist three places"
This data probably needs to go in the data
prop of ICreateSample
(which is untyped atm).
Currently, everthing lives in Channels.test.ts
which makes it hard to keep track of everything. Probably split up and move into smaller case-based testfiles in a separate folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.