iBicha / UnityYoutubePlayer

Play YouTube videos in Unity
The Unlicense
339 stars 64 forks source link

Sometimes when trying to play the video a NullReferenceException pops up and the video doesn't load. #122

Open Shonagon-Sei opened 6 months ago

Shonagon-Sei commented 6 months ago

The NullReference Error pops up randomly, and I have yet be able to diagnose the problem.

Here's the exception


YoutubePlayer.Components.InvidiousVideoPlayer.GetCompatibleVideoFormat (YoutubePlayer.Models.VideoInfo videoInfo) (at ./Packages/com.ibicha.youtube-player/Runtime/Components/InvidiousVideoPlayer.cs:145)
YoutubePlayer.Components.InvidiousVideoPlayer.PrepareVideoUrls (System.Threading.CancellationToken cancellationToken) (at ./Packages/com.ibicha.youtube-player/Runtime/Components/InvidiousVideoPlayer.cs:107)
iBicha commented 6 months ago

It could probably use a better error format, but this error happens when there's no video format available. Can you share the videoId and itag?

Shonagon-Sei commented 6 months ago

IDs hzCc6pp9cq8 K1QICrgxTjA BETPVN8V71Y I'm using the default itag

iBicha commented 6 months ago

I can't reproduce this error - can you share more details? How often? Any other errors in the console? Which Invidious instance are you using?

Shonagon-Sei commented 6 months ago

It happens 50% of the time, and there are no other errors. I'm using public Invidious Instance.

Mashimaro7 commented 3 weeks ago

I get this too... 100% of the time. Only the first error though.