Problem with YoutubeVideo and windows 8

Nov 6, 2013 at 1:37 PM
Hello, I have problems playing youtube video in a WinRT applications starting.
The list of available filamti is shown in a gridview, when I click on gridviewitem all the following code is executed but nothing happens.

var url = await YouTube.GetVideoUriAsync(youTubeId, YouTubeQuality.Quality1080P);
var player = new MediaElement();
player.Source = url.Uri;
player.Play();
Coordinator
Nov 6, 2013 at 1:38 PM
Edited Nov 6, 2013 at 1:41 PM
Check if url is null? If yes, try calling geturisasync and see what it returns...

See updated https://mytoolkit.codeplex.com/wikipage?title=YouTube&referringTitle=Documentation
Nov 6, 2013 at 4:30 PM
Url is not null, if i copy the url an paste in ie the download of mp4 file starting.

Da: [email removed]
Inviato: ‎06/‎11/‎2013 14.38
A: [email removed]
Oggetto: Re: Problem with YoutubeVideo and windows 8 [mytoolkit:466256]

From: rsuter

Check if url is null? If yes, try calling geturisasync and see what it returns...
Coordinator
Nov 6, 2013 at 8:33 PM
Then there is something with the winrt framework... Have you tried it on another pc? I've also seen that reinstalling the video drivers have solved this?
Nov 7, 2013 at 8:50 PM
Nothing!

I tried to reinstall the drivers and on another pc and a tablet (Acer Iconia w810) but nothing!
Below is a snippet of the code and the values ​​of the variables.



private async void itemGridView_ItemClick_1(object sender, ItemClickEventArgs e)
    {
        MainDataItem v = (MainDataItem)e.ClickedItem;
        var url = await YouTube.GetVideoUriAsync(v.UniqueId.ToString(), YouTubeQuality.Quality720P);
        var player = new MediaElement();
        player.Source = url.Uri;
        player.Play();
    }

//url.Uri = http://r4---sn-nx5cvox-hpa6.googlevideo.com/videoplayback?itag=18&sparams=id,ip,ipbits,itag,ratebypass,source,upn,expire&ip=79.0.85.216&key=yt5&upn=1lWi0cb9Lmo&sver=3&fexp=919111,914503,916623,924616,907231&source=youtube&expire=1383881009&id=bda4e82e2e707166&mv=m&mt=1383857308&ms=au&ipbits=0&ratebypass=yes&signature=7D14C57FCB2845F75EBD07D922B37F8975CB65AD.3A970E15D4028F1ABE7E2F32FFBAF49228FC36FE



can you help me?
thanks
Coordinator
Nov 7, 2013 at 9:58 PM
what youtube video id?
Coordinator
Nov 7, 2013 at 10:06 PM
Of course you have to add the media element to your XAML tree (see https://mytoolkit.codeplex.com/wikipage?title=YouTube&referringTitle=Documentation) or use an existing MediaElement. Also you may have to set the size of the MediaElement appropriately...
Nov 10, 2013 at 10:15 AM
Nothing, i'm disperate.
Do you have a running source code to test and discovery the right way?

Thanks

Da: [email removed]
Inviato: ‎07/‎11/‎2013 23.06
A: [email removed]
Oggetto: Re: Problem with YoutubeVideo and windows 8 [mytoolkit:466256]

From: rsuter

Of course you have to add the media element to your XAML tree (see https://mytoolkit.codeplex.com/wikipage?title=YouTube&referringTitle=Documentation) or use an existing MediaElement. Also you may have to set the size of the MediaElement appropriately...
Coordinator
Nov 10, 2013 at 10:31 AM
Edited Nov 10, 2013 at 10:33 AM
There is a winrt sample app in the source code of mytoplkit. You can checkout the code from svn (see mytoolkit home page).
Nov 10, 2013 at 12:33 PM
Hi, i'm not searching code For wp7/8 but For win8.1. It's the same ?
Thanks

Da: [email removed]
Inviato: ‎10/‎11/‎2013 11.31
A: [email removed]
Oggetto: Re: Problem with YoutubeVideo and windows 8 [mytoolkit:466256]

From: rsuter

Not for wp7, only wp8. You can checkout the code from svn (see mytoolkit home page).

Coordinator
Nov 10, 2013 at 1:28 PM
Edited Nov 10, 2013 at 1:28 PM
There's also a winrt sample app (win 8.0)