0.1.2 • Published 3 years ago

melo-tool v0.1.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

Melo Client Code

Melo is a web App that helps you to bring sound into your web projects easily. The npm package doesn't work without an API key from the Tool itself. Checkout the website at getmelo.io

Install

# with npm
npm install melo-client

with

// In your application, import and configure melo. E.g. your index.js file in your root. It can have a different name depending on how you named it in you package.json file.
import meloInit from "melo-tool";

meloInit({
    api: "", // Your Api Url here, you can get it from Studio of your project
    accesToken: "" // Your Acces Token here, you can find it right beneath the api url in the studio
});

or use good ol' plain js and place this in your footer

<script type="module" src="https://unpkg.com/melo-tool@0.1.0/dist/melo.umd.js"></script>
<script type="module">      
    window.melo({
        api: "", // your API here
        accessToken: "" // your Acces Token here
    });
</script>

CAUTION: This exposes your api credentials. This is not recommended for production. I recommend not to save to login credentials unsecured directly into your project. Dotenv can be a good way to store your credentials in environment variables.

Usage

In the studio tool you can define an identifier for your compositions. Use the data Attribute to connect your selected elements to you configured sound Files from the tool.

<div data-melo="your-identifier-here"></div>

The tool will now do the rest for you to initialise the audio files.

License

MIT

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago