iBicha / UnityYoutubePlayer

Play YouTube videos in Unity
The Unlicense
331 stars 63 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 2 months ago

Shonagon-Sei commented 2 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 2 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 2 months ago

IDs hzCc6pp9cq8 K1QICrgxTjA BETPVN8V71Y I'm using the default itag

iBicha commented 2 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 2 months ago

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