Closed tjvxh closed 1 year ago
Can you show some part of your code?
Or Message from throwed UnavailableStreamException.
please share us Exception.
Here's the exception, sorry for the delay
VideoLibrary.Exceptions.UnavailableStreamException: Video has unavailable stream.
at VideoLibrary.YouTube.ParseVideos(String source)+MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource(IEnumerable1 source, Boolean& found) at System.Linq.Enumerable.First[TSource](IEnumerable
1 source) at VideoLibrary.ServiceBase 1.GetVideoAsync(String videoUri, Func`2 sourceFactory) at SampleDownloader.DownloadAsVideo.DownloadVideo(String link, String saveTo)
Again, I'm not entirely sure if this is an issue with the library or with my code specifically. Here's what I'm using to download it, in my page DownloadAsVideo.xaml.cs
using (var service = Client.For(YouTube.Default))
{
var video = await service.GetVideoAsync(link);
}
if (saveTo.Length > 0)
{
ResultLink = Directory.GetParent(saveTo).ToString();
}
I believe I have resolved the issue and it seems to work now
I see that it should be compatible with Xamarin, but would it also be compatible with .NET MAUI? I was attempting to implement a video downloader, but I received this exception.
Exception thrown: 'VideoLibrary.Exceptions.UnavailableStreamException' in System.Private.CoreLib.dll
I'm unsure if it's an issue with my implementation (I'm still new to MAUI and Xamarin) or if the library isn't compatible.