iBicha / UnityYoutubePlayer

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

Unity Youtube Player (LEGACY) is not working #49

Closed mhadji05 closed 3 years ago

mhadji05 commented 3 years ago

UnityYoutubePlayer (LEGACY) is not working.

Please let me know the procedure I need to follow to run this project or if it has a problem and when will be fixed or how can i fix it.

Thank you in advance!

iBicha commented 3 years ago

The legacy version has not been updated in quite some time, and I'm not up to date on what needs to be done. I personally do not have the time to maintain it, but if someone from the community wants to take charge of that, that's fine

mhadji05 commented 3 years ago

Please can you give us instruction how can we update the dependencies such as: Youtube Explode, AngleSharp, etc. Maybe this fixing the problem but i don't know how to do it. I tried it but many files missing so i have a lot of errors and warnings.

Please let us know!

mhadji05 commented 3 years ago

Please can someone give me instruction how can I update Youtube Explode and nuget?

Thank you in advance!

shaked6540 commented 3 years ago

You need to right click the project in visual studio->manage nuget packages, then update only YoutubeExplode. There will probably be breaking changes, so you will have to fix them before you can compile the project

mhadji05 commented 3 years ago

@shaked6540 Thanks for your response. I m trying to find manage nuget packages when I right clicked but it doesn't exist this option. Please be more specific where can I Find this option.

Thanks in advance.

mhadji05 commented 3 years ago

@shaked6540 I went in visual studio Tools/NuGet package manager Manage NuGet packages for solution... and I searched for youtube explode by Tyrrrz and updated youtubeExplode .

I'm still getting this error:

HttpRequestException: 404 (Not Found) System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () (at <7ebf3529ba0e4558a5fa1bc982aa8605>:0) System.Net.Http.HttpClient+d52.MoveNext () (at <7ebf3529ba0e4558a5fa1bc982aa8605>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () (at <567df3e0919241ba98db88bec4c6696f>:0) YoutubeExplode.YoutubeClient+d10.MoveNext () (at Assets/_CompleteProject/_YoutubeNeeds/YoutubeExplode/YoutubeClient.cs:47) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () (at <567df3e0919241ba98db88bec4c6696f>:0) YoutubeExplode.YoutubeClient+<GetPlayerResponseParserAsync>d__11.MoveNext () (at Assets/_CompleteProject/_YoutubeNeeds/YoutubeExplode/YoutubeClient.cs:55) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () (at <567df3e0919241ba98db88bec4c6696f>:0) YoutubeExplode.YoutubeClient+d38.MoveNext () (at Assets/_CompleteProject/_YoutubeNeeds/YoutubeExplode/YoutubeClient.Video.cs:85) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () (at <567df3e0919241ba98db88bec4c6696f>:0) YoutubePlayer.highYoutubePlayer+d11.MoveNext () (at Assets/_CompleteProject/_YoutubeNeeds/YoutubePlayer/Scripts/highYoutubePlayer.cs:82) UnityEngine.Debug:LogException(Exception) YoutubePlayer.d__11:MoveNext() (at Assets/_CompleteProject/_YoutubeNeeds/YoutubePlayer/Scripts/highYoutubePlayer.cs:129) UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:104)

shaked6540 commented 3 years ago

Youtube explode is working fine, if you're still getting errors its either because the old project doesn't support it or you didn't update it correctly

mhadji05 commented 3 years ago

Did you try run Unity Youtube Player (LEGACY) for 360 videos? Did you achieve to run it successfully?

shaked6540 commented 3 years ago

No, I never used this project before so I can't help you with that. If youtube explode isn't working you should open an issue in the youtube explode repository and not here

iBicha commented 3 years ago

See #52 which updates to use NuGet for Unity. I tried the sample scene and it's working fine, except for captions. Try that branch, and if that works for you, I can merge it.

iBicha commented 3 years ago

Merged #52 Reopen if that doesn't fix it Thanks

mhadji05 commented 3 years ago

I could not make it work. A video or file showing step by step the process might help.

iBicha commented 3 years ago
  1. Pull branch legacy/youtube-explode
  2. Open the Unity project in Unity
  3. Open Assets/YoutubePlayer/Scenes/Player scene
  4. Press play.
mhadji05 commented 3 years ago

I also want to play subtitles. Is there a way to fix the problem so that the subtitles are displayed?

iBicha commented 3 years ago

That needs to be fixed on the YouTubeExplode side. They would need to publish a new version, and update it here.