youtube-to-html5-loader icon indicating copy to clipboard operation
youtube-to-html5-loader copied to clipboard

Error loading on Apple Safari

Open drzewinski opened this issue 4 years ago • 7 comments

Hi there!

I'm using your library to load YouTube videos on my app, however It's not working on iPhone Safari. I get the error Partial Content Code 206.

It seams that it's something specific to Safari. I searched the web and I found the following:

https://stackoverflow.com/questions/32996396/safari-9-0-can-not-play-mp4-video-on-the-storage-server#:~:text=The%20most%20common%20root%20cause,appears%20Safari%20cannot%20handle%20this.

https://blog.logrocket.com/streaming-video-in-safari/

Do you have any ideas on how to solve it?

Best regards, Marcus.

drzewinski avatar Apr 02 '21 19:04 drzewinski

@thelevicole Will this be fixed?

marcusx2 avatar Apr 10 '21 13:04 marcusx2

Yes, sorry, this will be fixed. I've been tied up with some other pressing projects but will find sometime this weekend to take a look. I'll try to get a fix pushed ASAP!

thelevicole avatar Apr 10 '21 13:04 thelevicole

Thank you! That is awesome! I appreciate it!

Marcus Drzewinski Co-Founder & Chief Technology Officer

Telefone/WhatsApp: +55 (51) 9999 3 5564 https://api.whatsapp.com/send?phone=5551999935564&text=Marcus%20Drzewinski E-mail: @.*** diarioescola.com.br | facebook.com/diarioescola | Google Partner https://cloud.withgoogle.com/partners/detail/?id=di%C3%A1rio-escola&hl=pt-BR

Em sáb., 10 de abr. de 2021 às 10:32, Levi Cole @.***> escreveu:

Yes, sorry, this will be fixed. I've been tied up with some other pressing projects but will find sometime this weekend to take a look. I'll try to get a fix pushed ASAP!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thelevicole/youtube-to-html5-loader/issues/11#issuecomment-817137496, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEI3DSWHNXMY2QLE6EF3VDTIBHQRANCNFSM42JJQAQQ .

drzewinski avatar Apr 12 '21 12:04 drzewinski

Ok so this is a bit of a bigger issue that I had thought. The problem is with how YouTube serve these files, I would assume the file streams this library is using are not intended for this purpose.

The solution could be related to my comment on annother issue...

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.

Essentially, I'm thinking we'd need to setup a man in the middle service. Unfortunatley, there is some extensive work to be done before this issue can be resolved.

thelevicole avatar Apr 12 '21 21:04 thelevicole

@thelevicole Is there any ETA for this?

marcusx2 avatar Apr 29 '21 16:04 marcusx2

@marcusx2 @drzewinski can you test the recent release 4.0.1, the examples here appear to be working in Safari

thelevicole avatar May 26 '21 11:05 thelevicole

It worked! Although it took ages to load on Safari for some reason.

marcusx2 avatar May 26 '21 18:05 marcusx2