Giter Site home page Giter Site logo

convert-and-seed-audio's Introduction

I'll never work on this, so I added the wontfix label to the open issues, and closed them.


convert-and-seed-audio

Build Status Dependency Status devDependency Status optionalDependency Status

example

server.js

var casa = require('convert-and-seed-audio')
var http = require('http')
var ecstatic = require('ecstatic')

var server = http.createServer(ecstatic(__dirname))
casa(server)
server.listen(8080)

client.js

var createClient = require('convert-and-seed-audio')
var dragDrop = require('drag-drop/buffer')

var client = createClient()

dragDrop('body', function (files) {
	client.upload(files)
})

server api

var casa = require('convert-and-seed-audio')

var emitter = casa(server)

  • server is an http.Server instance. You have to call server.listen().
  • emitter is an events.EventEmitter instance. You can call emitter.on, if you want.

events

  • error (err)
  • upload-request (infoHash)
  • new-bundle (bundle)

browser api

var createClient = require('convert-and-seed-audio')

Written for use with browserify.

var client = createClient()

client.upload(files, [cb])

  • files is a file or an array of files.
  • cb(err, infoHashes)
    • err is null or an Error object
    • infoHashes is an array of info hashes. If you uploaded one file, it is an array of one info hash.

client.download(songBundles)

  • songBundles is an array of song bundles, or a song bundle.

client.remove(songId)

  • songId is the id of the song bundle to remove.

var songBundle = client.get(songId)

  • songId is the id of the song bundle to return.
  • Returns songBundle.

install

With npm do:

npm install convert-and-seed-audio

license

VOL

convert-and-seed-audio's People

Contributors

artskydj avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

convert-and-seed-audio's Issues

Promises

There is too much error-handling noise.

Use promises to clean up the code. Do not expose a promise-based api, though.

No webtorrent on the server

ArtskydJ/music-room-site#1

I want to remove webtorrent from the server.

The server must support an upload via a post or something.
Then it will convert it if a client does not support that type.
Then it will serve it to the original uploader. Perhaps a few users of the room? Maybe the non-webrtc-compliant users as well?

The client has to figure out how to acquire files when it is supposed to.


I feel like this module is getting big.

Maybe the client and server should be different modules?

Maybe the server/client communication should be at a different level?


See notes.md.

Expose album art

I think the album art should be available in the bundle.

Methods of exposing album art:

  • as another file in the torrent
  • on a datauri string in the bundle object
  • other...

client api is wrong

The readme says

var upload = require('convert-and-seed-audio')()

when it is actually

var upload = require('convert-and-seed-audio')().upload

travis tests

to make travis pass, remove mp3 type, and use a non-proprietary format.

connect to web peers

make new repo with hybrid version, so wrtc does not install on this version

global.WRTC = require('wrtc')
global.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io' ]

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.