Issue in Maui app #878
Replies: 1 comment
-
For total clearness, I have the full code in a repo here: https://github.com/MScriptGit/YTDownloader |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm new to both GitHub and packages, so please bear with me.
I thought it was fun to make a MAUI app (made one before without problems) to download from YT.
My issue is this: as soon as I put the example code
`var youtube = new YoutubeClient();
// You can specify either the video URL or its ID
var videoUrl = "https://youtube.com/watch?v=u_yIGGhubZs";
var video = await youtube.Videos.GetAsync(videoUrl);
var title = video.Title; // "Collections - Blender 2.80 Fundamentals"
var author = video.Author.ChannelTitle; // "Blender"
var duration = video.Duration; // 00:07:20`
in my MainPage.xaml.cs page, I get an error message upon testrunning:
"DataTemplateExtension: Could not
locate type for local: MainPage"
When I remove or comment above code, no problem arises.
When I move the code to another page, I still get the same error.
Yes, I did declare the YoutubeExplode namespace.
I can't seem to find a solution.
I hope you guys can help me!
Beta Was this translation helpful? Give feedback.
All reactions