Skip to content

Commit 1357ec4

Browse files
committed
Updated README file
1 parent 63e92be commit 1357ec4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Jukebox
2-
=======
1+
#Jukebox
32

43
A nodeJS youtube jukebox application. Great for parties and stuff :-)
54

6-
Shoutout to ningu in #node.js who helped me with ffmpeg stuff :-)
5+
##Dependancies
6+
- Avahi (`sudo apt-get install libavahi-compat-libdsnssd-dev` for debian/ubuntu, windows users go [here](https://developer.apple.com/bonjour/))
7+
- Speaker (`sudo apt-get install libasound2-dev` for debian/ubuntu, no install required for windows)
8+
- Ffmpeg (`sudo apt-get install ffmpeg` for debuan/ubuntu, windows users can get it [here](http://ffmpeg.zeranoe.com/builds/))

video.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ function getInfo (video_id, callback){
4545

4646
function play(video_info){
4747
console.log("Now Playing: " + video_info.title);
48-
var proc = new ffmpeg({ source: request(video_info.audioURL), nolog: true }).toFormat('wav').writeToStream(new speaker);
49-
48+
var stream = request(video_info.audioURL);
49+
var speaker_instance = new speaker();
50+
var proc = new ffmpeg({source: stream, nolog: true}).toFormat('wav').writeToStream(speaker_instance);
51+
speaker_instance.on('error', function(err){
52+
console.error("ERROR: " + err);
53+
});
5054
}
5155

5256
exports.getInfo = getInfo;

0 commit comments

Comments
 (0)