blob: a3b4b9f77a6649760e4e668f2957a0cbe98816e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// omg I am tired of code
const { getPlayer } = require('./players')
const { getDownloaderFor } = require('./downloaders')
const EventEmitter = require('events')
class InternalApp extends EventEmitter {
download(arg) {
return getDownloaderFor(arg)(arg)
}
}
async function main() {
const internalApp = new InternalApp()
const player = await getPlayer()
player.playFile(await internalApp.download('http://billwurtz.com/cable-television.mp3'))
}
main().catch(err => console.error(err))
|