iBicha / UnityYoutubePlayer

Play YouTube videos in Unity
The Unlicense
338 stars 63 forks source link

Does this work for android? #2

Closed elblogbruno closed 3 years ago

elblogbruno commented 5 years ago

First let you know You are doing a wonderful job. Does this work for android? I need it to. thank you,keep working like that! Bruno

iBicha commented 5 years ago

Hi Bruno,

Unfortunately at the time being, this does not work on Android (as far as I tested, on the version where this was developed, which was 2018.3.4f1, you might get better luck in a newer version, see the following). More specifically, the call to HttpClient.GetStringAsync hangs on android and never returns.

A bug report has been sent to Unity, and I got a response back from Unity QA (Case 1118741):

Hi,

Thanks for the report.

This behavior this does not occur anymore in future release version (2019.2) on 
Android. Since it's not clear what fixed the issue I can request for a backport 
regarding this, although testing this on iOS and on Android in 2019.2 it appears 
there is another problem. The video gets stuck after almost half of it played. Have 
you checked this issue on an iOS device. Is this to be expected with your project?

Regards,
Tomas K.
QA team

This issue is still under further investigation. But according to QA this has been fixed in newer Unity versions, but I did not test this yet.

I will keep this issue open and update it accordingly.

elblogbruno commented 5 years ago

So it's a problem about unity not the libraries? Thank you, I'll test it with a new version of unity.

elblogbruno commented 5 years ago

https://github.com/flagbug/YoutubeExtractor have you seen this? It says xamarin.android

elblogbruno commented 5 years ago

https://github.com/HaarigerHarald/android-youtubeExtractor or this maybe creating an android plugin

elblogbruno commented 5 years ago

OK UPDATE HERE: I've updated to unity 2019.1.0b7 and the video player works on android. The download button does not. image with this settings. I'll try updating to unity 2019.2 to see if there are any problems.

elblogbruno commented 5 years ago

Assets\YoutubeExplode\YoutubeClient.Video.cs(252,63): error CS1503: Argument 8: cannot convert from 'VideoQuality' to 'YoutubeExplode.Models.MediaStreams.VideoQuality'

I'm getting this error integrating your project in mine. ANY SOLUTION?

iBicha commented 5 years ago
elblogbruno commented 5 years ago

I'm not trying to convert, just importing your project inside mine gives me this error. Also, now updating to unity 2019 the VR is broken and I'm trying to guess if it is related to this project itself or my project being corrupted on the update of unity. Thanks for answering! Bruno

mhadji05 commented 5 years ago

i try this and work with Android on Unity 2019.2.4

iamrajajamal commented 5 years ago

Did anyone try this for IOS?

mhadji05 commented 5 years ago

I didn't try it on IOS but I think is work fine with Unity 2019.2,x Do you have any problem?

iBicha commented 4 years ago

Hi, Please check #10 , I have tested this on Android and iOS for now. If there are any more specific issues, please provide details on how to reproduce, and open another issue if that makes sense. Thanks

Sauvik-Redapple commented 4 years ago

Its working on 32 bit android but not on 64 bit android

iBicha commented 3 years ago

UnityYoutubePlayer no longer depends on YoutubeExplode or any of its dependencies. Please open another issue if this problem persists.