This project is read-only.

1080p doesn't seems to be provided by the youtube response anymore.

Oct 22, 2013 at 5:22 PM
I just checked the latest build and it seems like YouTube doesn't provide the 1080p and up Responses anymore. The max Resolution provided by the Response is 720p. WebM and other resolutions are limited too(check the Loops in the OnHtmlDownloaded method). Is there a way to fix that or is it the end of Full HD Entertainment after this move by YouTube? the issue is Happening since about a week(been Monitoring there moves) were YouTube got some maintenance and since then it seems like is not possible to get 1080p in the Response. Hope someone can figure out a solution.

Oct 22, 2013 at 6:24 PM
So, have you already debugged the source code and there is no 1080p URL in the response? And also in no 1080p string in the raw HTTP result?
Oct 22, 2013 at 6:27 PM
It seems that YouTube.Play has a bug => max quality is always 480p... I'll fix it and test your issue
Oct 22, 2013 at 7:25 PM
Ok, it seems that google has changed something in the HTML. I've updated the source code...

Please test it from the SVN repo:

If everything is still working, ill release a new nuget package...
Oct 22, 2013 at 7:51 PM
I've just tested and uploaded a new NuGet version and ZIP package (v2.0.7). This should solve your problem and can now load videos between 240p and 1080p (if available).
Oct 22, 2013 at 10:39 PM
Edited Oct 22, 2013 at 10:44 PM
Thank you rsuter! gonna test it in few moments and Report if working. And yes i debugged the code to see if 1080p is comming but nothing. Will test the new one and let you know. Btw i haven't tested your WP8 code but isn't Google blocking it??? would be great if there's a way to get it working on Windows phones.
Oct 22, 2013 at 11:10 PM
Wp should also be working. Only problem may be that it is officially not allowed to play youtube movies in 3th party apps..
Oct 22, 2013 at 11:27 PM
Edited Oct 22, 2013 at 11:50 PM
Ok, i just got the svn but i'm having some hard times trying to figure out how to compile it because it keeps giving me Errors over and over. I installed all nuget packages but each time i fix something a new error appear telling me this or that is wrong or missing. I'm i missing something? using VS2013 pro btw.

I think there is something wrong with Microsoft.Bcl. Also i Keep getting this error:

"Error 47 The type 'System.Threading.CancellationToken' is in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.0\Profile\Profile136\mscorlib.dll' as well as in '\mytoolkit\packages\Microsoft.Bcl.1.1.3\lib\portable-net40+sl4+win8+wp71\System.Threading.Tasks.dll' available"
Oct 23, 2013 at 5:42 AM
Edited Oct 23, 2013 at 5:55 AM
I just tested the compiled Versions you uploaded and it works great. The svn as reported is still giving me pain to compile. What am i missing??? do you have another one that probably compiles??? because is going to take quite Long to check all the stuff.

Would be great to be capable of getting all Video formats and links from a specified Video instead of a specified Quality. For instance if i pass the Video ID i get a collection of YoutubeUri or something like that containing all different Kind of types like 3gp, WebM and MP4 of course. During the debug i noticed that all types and res are checked in the OnHtmlDownloaded method of the Youtube.cs class but other types are either ignored or Quality removed. Having such a Feature would allow other developers to choose the Quality themselves or just list different Qualities on demand.
Oct 23, 2013 at 9:34 AM
Ill look into this, there might be a problem with the referenced dlls... where do you use MyToolkit (Windows Phone, WPF, WinRT?)

In the next version ill add the option to call GetVideoUris(...) => collection of uris...
Oct 23, 2013 at 5:37 PM
Edited Oct 23, 2013 at 7:32 PM
Cool!, i'm not actively using it right now because of the issues mentioned. So far i've only made a WPF test. I do own Windows tablets and a Windows Phone 8 tho.

I just tested your code and as mentioned it works but there is a issue. Video do Play but no Audio. I checked the string and it seems like some Parameters are wrong. Sadly i do not know much about youtube params but the param "&signature=" is empty at the end and is also included twice. I used a different code to decode the YouTube link and get the Video and when i use that string the Sound works. I tested on Windows and WP8.

Update 2:
I just noticed that when selecting 720p i get the itag # 136 which i believe it should be 22 instead when taking this page as reference:

That may explain why i can see the Video but no Sound. Tested and older wpf Version and it works with sound on both Windows and Windows phone when copying the link over so i guess that's the reason.

Update 3:
Seems like i was right... " [4] itags 133-137 and 160 are for video-only streams" from the YouTube wiki site.
Oct 23, 2013 at 9:46 PM
Correct, it seems that there is no 1080p with audio and video now?
Oct 23, 2013 at 9:56 PM
Edited Oct 23, 2013 at 9:56 PM
Seems like that.... could you at least add the code back to get 720p working again??? is sad that Google is limiting the Service in such a way right now just to force the use of there APIs. At least 720p is still available so better than nothing i would say.
Oct 23, 2013 at 9:59 PM
Ok, ill update the source code and release a new nuget package, at the moment it is broken - i didnt notice the missing audio because my pc was set to mute - i only tested some videos if they are still playing...
Oct 23, 2013 at 10:18 PM
Edited Oct 23, 2013 at 10:20 PM
Cool! Are the compiling Problems fixed?
Oct 23, 2013 at 10:20 PM
Where is this error? In the "MyToolkit" project or in the "MyToolkit.Extended.Wpf45" project?
Oct 23, 2013 at 10:45 PM
Edited Oct 24, 2013 at 8:32 PM
Edited the post because the message was to Long.
Oct 23, 2013 at 10:47 PM
No matter which Project i try to compile i Keep getting the same Errors.
Oct 23, 2013 at 10:56 PM
i dont see the problem yet, it is working on my machine...
i just updated the nuget package... check it out...
Oct 23, 2013 at 11:12 PM
Checked the latest build and works like a charm obviously only to 720p but that's at least something. Many thanks for adding the GetVideoUris method!

I have one more question since you seems to be more experienced in WP8 than me(i Focus more on Desktops apps in WPF). Is there a way to get a certain element of the Webbrowser like Document.GetElementByID??? i was toying around with the same code in WPF and you can use the Webbrowser to set a text to a web TextBox as well as click Buttons or read values from links etc. is that possible on WP??? the Webbrowser included seems to be kinda limited tho.
Oct 23, 2013 at 11:22 PM
I think you have to combine a video and audio stream to have 1080p playback.. I think this may be tricky (especially on windows phone).

webbrowser: i dont know i you can directly access the dom. But maybe you can call javascript using a url navigation call (put javascript into the uri)? Prepare some js and call it?

maybe you should have a look at my htmltextblock control, which parses html and generates native controls (textblocks, images, etc) it does not support a lot of tags but it avoids the webview control :)
Oct 23, 2013 at 11:36 PM
Edited Oct 23, 2013 at 11:47 PM
I think i can Combine both. I'm very experienced when it Comes to that Kind of things(WP8 will be tricky as you said unless multiple mediaelements are supported) the idea is to create a synchronizer class for both one for Rendering and the other for audio. However i just noticed that 1080p isn't listed anymore on your latest build. I could run some tests if you add it back again to get the Video only stream. I also noticed that you added the ability to read the Audio stream only which is fantastic... having both i can do that for sure and Report results. That could bring back 1080p XD

Will check out your htmltextblock control ;)

The Audio enumerations seems to have a bug as the result return Video. However when the GetVideoUris method is used the Audio streams are included.
Oct 24, 2013 at 7:11 PM
I intended this behaviour... GetVideoUris returns all uris, also the audio uris. In the next version the method is called GetUris and has some other improvements...
Oct 24, 2013 at 8:32 PM
Edited Oct 24, 2013 at 8:35 PM

Just noticed one Thing tho. i made a small Windows phone 8 test application to test the library and i can Play a Video just fine but.... only if i use my home wireless Connection. While testing the same app at work using my mobile Internet(around 8mbps) nothing happens and the code seems to fail. I will have to do some more tests but is there a reason for that??? or is Google actively detecting whatever you're using a phone or not? is interesting because if i use my home wifi everything works perfectly. My phone mobile Connection is also fast enough as i use it to watch tons of YouTube Videos from time to time.
Oct 24, 2013 at 8:38 PM
Check this:

Do you get an exception or what? You should implement the completed callback like this:

YouTube.Play("youtube_id", true, YouTubeQuality.Quality480P, x =>
        if (x != null)
Oct 24, 2013 at 8:44 PM
if you'd like to talk about this, you can contact me over skype (rico.suter). (i speak german too :)
Oct 24, 2013 at 9:38 PM
Edited Oct 24, 2013 at 11:14 PM
Was just a simple test so i didn't added any error handling(i know how to do that of course :p). Was merely to see if it works and Report to you the results. Will install skype and add you to my contact list :) i speak german too but i prefer english hehehehehe.

About the links:
I like what you added there in order to Play the Video etc. but i personally prefer to implement that myself using MVVM. I made a nice viewmodel and behaviour for Windows phones to handle Input and other stuff. Personally i Focus a lot in design and because of that i rarely use Standard Buttons to Trigger code but mostly custom Icons with bindings.