Open kanestapler opened 3 years ago
I have the same problem.
Undefine selectedStream on Line 153 is null.
Chrome Console Reports: Uncaught (in promise) TypeError: Cannot read property 'url' of null at YouTubeToHtml5.js:1
Firefox Console Error Reports: Uncaught (in promise) TypeError: g is null loadSingle /YouTubeToHtml5.js:1
I looked into it for some time, but I didn't completely understand what was happening in the response from the youtube API. I will try to check again after the holidays if thelevicole hasn't found it by then.
Roger that, great job for investigating.
I wonder, have you seen my other 'issue' post by the way? Are you having the same problem? https://github.com/thelevicole/youtube-to-html5-loader/issues/4
THIS PROJECT DEAD?
Hi all, sorry for the delay! It's been a v-busy new year with work and I haven't had time to respond to these issues.
An update will be pushed today to better handle the JS error. However, there is a larger issue at hand which is going to take some time and ongoing work to be resolved...
Some YouTube videos require a signature to be sent with the stream request. The signature is provided as a scrambled cipher that needs to be decoded before it can be used. The cipher and decoding process is regularly changing so replicating and decoding within the package client side is not viable. Each time the process changes on YouTubes end, we'd need to reverse engineer the decode process and release an update to this package.
At this time, I need to do more research into this and potentially deploy an API to handle the decode process to avoid the concerns mentioned above.
@thelevicole Very much appreciate some fortunate people on not sat on Furlough, I've forgotten what it's like to be at work lol, fingers crossed back soon.
Fab to hear of your efforts in this interesting project. Thanks :+1:
Hi all v4.0.0 has been published which includes better error handling for unplayable streams. Please note that this update includes breaking changes so make sure you read the release notes for info.
Despite the new release, I am leaving this issue open until a soultion has been found for the signature decoding issue mentioned in my previous comment.
An example video that throws an error is https://www.youtube.com/watch?v=SbnQe6VQEWA.
My first guess is that it might have something to do with copyright causing the response from youtube to be in a different format.
parseYoutubeMeta
returns an empty object which causes an error to be thrown due toselectedStream
being null on the line below.Throwing the error vs failing quietly isn't really a huge issue, but I was hoping it was possible to make videos similar to the one above work. I am looking at the code in
parseYoutubeMeta
to see what is happening, but I'm not entirely following it just yet.