I have XAML:
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <WebBrowser x:Name="webBrowser1"/> </Grid>
I am trying to play a video on YouTube. This is what I tried:
this.webBrowser1.Source = new Uri("http://youtube.googleapis.com/v/L8bE5-g8VC0");
This window displays the YouTube player with all player controls. However, the full screen button does not work. I click on it, but the player does not go into full screen mode. The button just turns off.
I also tried this:
this.webBrowser1.Source = new Uri("http://www.youtube.com/embed/L8bE5-g8VC0");
It also shows the YouTube player with all player controls. The fullscreen button works correctly. However, when I again go to this video or another (by setting the Source property), the player buttons disappear. To see the player buttons again, I need to delete temporary Internet files for IE. I can delete temporary files every time before playing the video, but this is not a solution for me.
I am running Windows 7 64bit and using WPF 4.0. I want to display the YouTube player in my WebBrowser and work with the full screen button. Does anyone have an idea?
source share