This project is read-only.

GetVideoUriAsync is failing for both WinRT and Windows Phone

Feb 14, 2013 at 1:49 AM
It seems this started today and the exception returned for all videos is "no_urls_found". Are you having this issue too?
Feb 14, 2013 at 1:54 AM
It seems youtube has changed their api, again.. I'll look into this tomorrow...
Feb 14, 2013 at 1:56 AM
Thanks for the quick response. Yeah I figured that was the case. Really like your library. It has helped me create some popular apps for WP and WinRT!
Feb 14, 2013 at 2:37 AM
Edited Feb 14, 2013 at 2:50 AM
I sure hope you can fix this because I really like this library and use it in one of my Windows 8 apps that is now not working. Please keep us posted and thanks for all the work you did on this!
Feb 14, 2013 at 7:29 AM
same here :). my app is broken too. BTW thanks for lib. its very helpful!
Feb 14, 2013 at 8:07 AM
Edited Feb 14, 2013 at 8:14 AM
The bug has been fixed and is now available in the project's subversion repository.
Please test if it is working for you...?
As soon as I've made some more tests, I will release a new NuGet package version.
Feb 14, 2013 at 1:10 PM
Edited Feb 14, 2013 at 1:38 PM
So far so good. It's working for me.

Oh, and thanks for the hard work!
Feb 14, 2013 at 2:23 PM
Ok, new NuGet version (1.11.0) is available with the youtube fix...
Feb 14, 2013 at 4:02 PM
Downloaded, installed (with nuget manager). Deleted all files from debug/release folders, recompiled, deployed to
phone, but no :-(

My application buyers (JOK Usenet Client) will hang me ;-)
Feb 14, 2013 at 4:26 PM
Are you using v 1.11.0? I just checked the newest NuGet version with the the sample phone app...
Feb 14, 2013 at 4:39 PM
Edited Feb 14, 2013 at 4:40 PM
If I can trust my Express 2010 screen, I'm using currently (properties by file in sol. explorer -> reference)

MyToolkit 1.11.0.0
Runtime 2.0.50727

and

..extended
Identical version info.

I also double checked that my JOK really call PlayTube with correct id.
Yep. It is ok. And my own video, so I know it is there ;-). Works fine with IE.

Just stopped to work with phone somewhere yeasterday-today.
Feb 14, 2013 at 4:42 PM
Edited Feb 14, 2013 at 4:42 PM
Can I have the YouTube ID to test it in my sample app?
Feb 14, 2013 at 4:48 PM
For example this one:
jwXCo5DIR14
Feb 14, 2013 at 4:56 PM
Its working in my sample phone app in the emulator... maybe you should restart your phone (see https://mytoolkit.codeplex.com/discussions/432565)
Feb 14, 2013 at 5:07 PM
Edited Feb 14, 2013 at 5:11 PM
Argh.... Not hard coded even...

PlayTube("jwXCo5DIR14");

no_video_urls_found

Same thing with phone AND emulator.
Feb 14, 2013 at 5:13 PM
Edited Feb 14, 2013 at 5:20 PM
Hmmm, is there a simple way to check this "no_video_urls_found" situation.
I would like to insert "http://www.youtube...." method if PlayTube fails open the video.

Damn again. Sorry. I call original YouTube.Play by my own
PlayTube routine, and forgot the original one, which have
a return value. I have to find my eyes. Dropped somewhere ;-)

But, still. Doesn't work. I really hope, this is not country debended
problem...
Feb 14, 2013 at 5:19 PM
To really find the problem, you have to debug the MyToolkit's YouTube code on your machine... something must be wrong in the YouTube HTTP response with your provider or on your computer... You have to download the whole source code of the project here or with subversion.

See http://mytoolkit.codeplex.com/wikipage?title=YouTube

There is this part:
    YouTube.Play("youtube_id", true, YouTubeQuality.Quality480P, x =>
    {
        if (x != null)
            MessageBox.Show(x.Message);
    });
in the completed handler check if x.Message == "no_video_urls_found" and launch the browser...
Feb 14, 2013 at 5:30 PM
Edited Feb 14, 2013 at 6:31 PM
in the completed handler check if x.Message == "no_video_urls_found" and launch the browser...
Did that almost instantly when found original calling routine from my code :-)

Ok. I download sources and start to debug tomorrow. Weird...

    public void PlayTube(string tube_id)
    {
        string link;
        YouTube.Play(tube_id, true, YouTubeQuality.Quality480P, x =>
        {
            if (x != null)
            {
                if (x.Message == "no_video_urls_found")
                {
                    string message = "Something odd happened with direct YouTube player. Open video on Web browser instead?";
                    string caption = "YOUTUBE URL NOT FOUND";
                    MessageBoxButton buttons = MessageBoxButton.OKCancel;
                    MessageBoxResult mresult = MessageBox.Show(message, caption, buttons);
                    if (mresult == MessageBoxResult.OK)
                    {
                        WebBrowserTask wbTask = new WebBrowserTask();
                        link = ("http://www.youtube.com/watch?v=" + tube_id);
                        wbTask.Uri = new Uri(link, UriKind.RelativeOrAbsolute);
                        wbTask.Show();
                    }
                }
            }
         });
    }
Feb 14, 2013 at 8:17 PM
I updated from NuGet and tested my Windows 8/RT app and my Windows Phone app and both are working again. Thanks for the quick response! Now if only I can get these updates published before all the one star ratings come...
Feb 14, 2013 at 8:28 PM
My Windows 8 app was published or updated within one day... maybe you are lucky...
What app have you developed?

Mine: http://apps.microsoft.com/windows/en-us/app/sketchagram/877af7d1-bcec-42a4-9006-524fbeb6b7f2
Feb 17, 2013 at 8:02 PM
Warning: Version 1.11.0 had a bug in GetVideoUriAsync: Max quality was always 480p even if specified otherwise... Now fixed in 1.12.0 available on NuGet...
Feb 19, 2013 at 4:49 AM
FYI

Please make sure your that project's references for both MyToolkit and MyToolkit.Extended, under their Version Property it's set to 1.12.0.0.

I noticed that even though running this command in the Package Manager Console:

PM> get-package -update

Id Version Description/Release Notes

MyToolkit 1.12.0 Website: mytoolkit.codeplex.com
MyToolkit.Extended 1.12.0 Website: mytoolkit.codeplex.com

Was't good enough to update the assembly version.

So I deleted both references, then

PM> install-package MyToolkit.Extended
Attempting to resolve dependency 'WPtoolkit (≥ 4.2012.10.30)'.
Attempting to resolve dependency 'MyToolkit (≥ 1.12.0)'.
Successfully installed 'MyToolkit 1.12.0'.
Successfully installed 'MyToolkit.Extended 1.12.0'.
Successfully removed 'MyToolkit.Extended 1.10.0' from QuadratinMX.
Successfully removed 'MyToolkit 1.10.0' from QuadratinMX.
Successfully added 'MyToolkit 1.12.0' to QuadratinMX.
Successfully added 'MyToolkit.Extended 1.12.0' to QuadratinMX.
Successfully uninstalled 'MyToolkit.Extended 1.10.0'.
Successfully uninstalled 'MyToolkit 1.10.0'.1.10.0'.


Abe
Feb 19, 2013 at 7:55 AM
Strange, just checked the versions:
All DLLs have the correct version (1.12.0) and the NuGet package specifies the correct dendencies... (see https://www.nuget.org/packages/MyToolkit.Extended/

Whats the problem here?
Feb 20, 2013 at 8:33 PM
Hi there, I have also had that problem, and updating the library made it work fine with Wp8, but my app is not loading the video in wp7.1!

Anyway to fix that?! What I am doing wrong?
Feb 20, 2013 at 10:52 PM
Are you sure you're referencing the newest DLLs (see reference properties, v1.12.0)? Restart your computer, test it on another computer/emulator/phone... Otherwise you have to debug using the MyToolkit's sources...
Feb 20, 2013 at 11:30 PM
Yeap, both DLLs are in 1.12.0.0
I have restarted my computer, tested it on 2 devices em 3 emulators (7.1, 7.8 and 8), it works without any problem in the WP8 emulator.

I will got the sources of MyToolkit to create a simple project to see where it can be going wrong... Unfortunately it is getting late here (Brazil) anda maybe I will finish this just tomorrow!

Got a look into the changes in the Source and I couldn't find anything that could break the lib as it have happened. Anyone is having similar problems?

Thank you!
Feb 20, 2013 at 11:32 PM
Theres a wp7 sample app in the "- samples" directory...
Feb 20, 2013 at 11:48 PM
Edited Feb 21, 2013 at 10:44 AM
Sry Double Post!
Have been trying the example that @rsuter told, same behavior, the app looks like it is downloading the video to stream, but it never gets it done.
Have tried into Lumia 800 and Emulator 7.1 (VS2012/win8), no luck in both cases.
There is no message into Console out, and going with a breakpoint into the methods all seems fine...