UnityYoutubePlayer icon indicating copy to clipboard operation
UnityYoutubePlayer copied to clipboard

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

Open Shonagon-Sei opened this issue 1 year ago • 5 comments

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)

Shonagon-Sei avatar May 21 '24 14:05 Shonagon-Sei

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?

iBicha avatar May 21 '24 16:05 iBicha

IDs hzCc6pp9cq8 K1QICrgxTjA BETPVN8V71Y I'm using the default itag

Shonagon-Sei avatar May 22 '24 07:05 Shonagon-Sei

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?

iBicha avatar May 22 '24 14:05 iBicha

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

Shonagon-Sei avatar May 22 '24 17:05 Shonagon-Sei

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

Mashimaro7 avatar Oct 29 '24 10:10 Mashimaro7