From 3e8aabc331bb1a78c5e5d1af8efce27a6530e416 Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Wed, 9 Nov 2016 06:45:43 +0200 Subject: [PATCH] a webbrowser --- MainWindow.xaml | 6 ++++-- MainWindow.xaml.cs | 12 ++++++++++++ YTPlayer.csproj | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index da3c90f..1ffe556 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -6,7 +6,9 @@ xmlns:local="clr-namespace:YTPlayer" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> - + - + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 429acee..03ce588 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -23,6 +23,18 @@ namespace YTPlayer public MainWindow() { InitializeComponent(); + wbSample.Navigate("https://www.youtube.com/embed/-yPuWcCykNk?html5=1"); + //wbSample.Navigate("https://www.youtube.com/html5"); + } + + //private void wbSample_LoadCompleted(object sender, NavigationEventArgs e) + //{ + // dynamic document = wbSample.Document; + // dynamic head = document.GetElementsByTagName("head")[0]; + // dynamic scriptEl = document.CreateElement("script"); + // scriptEl.text = "swfobject.embedSWF = function(){}"; + // head.AppendChild(scriptEl); + //} } } diff --git a/YTPlayer.csproj b/YTPlayer.csproj index 375ddd3..7d23dbd 100644 --- a/YTPlayer.csproj +++ b/YTPlayer.csproj @@ -37,6 +37,7 @@ +