iBicha / UnityYoutubePlayer

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

General access denied error #116

Closed Muhammad-Asim-Dev closed 5 months ago

Muhammad-Asim-Dev commented 5 months ago

WindowsVideoMedia error 0x80070005 while reading https://invidious.fdn.fr/latest_version?id=5jlI4uzZGjU

Context: MFCreateSourceReaderFromURL Error details: General access denied error

Track types:

VideoPlayer cannot play url : https://invidious.fdn.fr/latest_version?id=5jlI4uzZGjU

Cannot read file.

iBicha commented 5 months ago

Thanks for reporting - this can happen on some videos (usually more popular videos, music videos, etc) where YouTube detects that you're requesting the video from one location (in this case https://invidious.fdn.fr, so France) but playing the video from a different location. You can try to choose a different instance (select the Invidious Instance component, and set the Invidious instance type to custom, and choose a different url from https://api.invidious.io - or host your own server)

I will attempt to improve this by adding proxying videos on failure.

iBicha commented 5 months ago

I have merged a fix - but it is tricky because the Unity VideoPlayer takes a long time trying to load the video before it fails. I will keep an eye on it for a while before I release a new version, but you can get the fix from the main branch

iBicha commented 5 months ago

Reopening until I publish the fix in a new version. The problem remaining is that when the video is blocked, Unity's VideoPlayer takes forever retrying before erroring out. This makes it seem that the video is taking really really long to load. I will add an optional HEAD call to make sure the video works.

iBicha commented 5 months ago

Fixed in v3.3.0

Muhammad-Asim-Dev commented 5 months ago

Thanks it worked using proxy