I listen but I don't see

Mar 15, 2012 at 12:26 AM

I write

<myToolkit:YouTubeButton YouTubeID="U2GYJDxsS5U" Click="OnButtonClick" />

and in code behind

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            YouTube.CancelPlay();
            ....
        }

        protected override void OnBackKeyPress(CancelEventArgs e)
        {
            if (YouTube.CancelPlay()) // used to abort current youtube download
                e.Cancel = true;
            //else
            //{
                // your code here
            //}
            base.OnBackKeyPress(e);
        }

        private void OnButtonClick(object o, RoutedEventArgs e)
        {
            var ctrl = (YouTubeButton)o;
            YouTube.Play(ctrl.YouTubeID, true, YouTubeQuality.Quality480P);//, (e) => {MessageBox.Show(e.Message);});
        }

I see the Thumbnail correctly and when I click the image the player start correctly.
The problem is that I listen the video but I don't see it.


Can you help me?

Mar 15, 2012 at 5:46 PM

 

Take a look at the following windowsphonegeek`s article:

"#5 How to use MediaPlayerLauncher in a WP7 app"

If you test your scenario in the emulator then (I found this in the suggested article):

NOTE: In windows phone 7 emulator the application can start the media player and the user can play music, but video is not rendered.

Hope this will help you.

Mar 15, 2012 at 5:47 PM

the official thread is:

 

http://msdn.microsoft.com/en-us/library/ff955600%28v=VS.92%29.aspx