events.js:160throw er; // Unhandled 'error' event
Opened this issue · 10 comments
It looks like you're running the master branch of this project. Could you also provide the video ID that you used? I've run into this error randomly due to the video stream failing to load and I just reloaded the server and tried again at a later time.
Yes, I used the master branch.Which branch should I use?
video link: https://www.youtube.com/watch?v=v7K4vGYL9zI&list=RDv7K4vGYL9zI.
Ah that explains it. The code that extracts the video ID in line 108 of index.js naively separates the link by the=
sign and takes the first element. If you paste in a link of that form, it won't be able to extract the video ID properly. You need to paste a link of the form:
https://www.youtube.com/watch?v=v7K4vGYL9zI
(notice that this doesn't include the list
parameter).
The master
branch contains my full project with the spatialization code. You need to paste the full video URL in there according to the spec above.
The blog-min-example
and blog-min-example-2
branches contain minimal working examples that require you to paste only the video ID. You can modify them to take a URL instead if you write a more robust parser to extract the video ID.
Please let me know if you have any more questions. If you came here from my blog post, you're probably looking for the blog-min-example
branches. You can mess with the master
branch if you're experienced with audio processing and/or JavaScript, but it is much more complicated than the minimal working examples.
I tried the above solution but the problem still exists. And when I am executing the blog min example there is no response from the server (no effect after the click action).
In the blog-min-example
and blog-min-example-2
branch, the server will not give any response except the audio stream. If you paste the ID and there was no error, you should hear the audio playing in your browser after it loads. Try a short video to see if it loads faster. I'd also suggest logging the data stream as well as the URL received on the server to see if it is correctly formatted.
This part of the code is not working. Neither the success callback method is working nor the error function.
https://www.youtube.com/watch?v=sBo52--2XU4 using this link for executing the program.
If the client side isn't working, it's likely an error on the server. I've started running into odd stack overflow issues with youtube-audio-stream. I've filed this up the chain in this issue here if you'd like to follow along. If this is an error on the package side or YouTube's side, then it will be out of my control.
Can I get the link to the tutorials which you used during the hackathon? plz.
I didn't use any tutorials during the hackathon. I came up with most of this code and architecture myself.