Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Include a HTML tag (video) from Silverlight App in a webpage
5 replies. Latest Post by CARNIBAL06 on August 31, 2009.
(0)
CARNIBAL06
Member
0 points
5 Posts
08-28-2009 4:15 PM |
Hi,
I have a datagrid who show several videos. When user click on a video, i would like play it.
First, i thank to do it with MediaElement, but my videos are not only wmv.
So, i think to use <video> html tag to play video. But, is it possible to include dynamically a <video> from Silverlight (at OnClick on a movie for example) in my current webPage ?
If yes, how and if no, do you have an other idea to do that ?
Regards,
Guillaume
TomGiam
Participant
788 points
220 Posts
08-28-2009 5:21 PM |
You could try:
System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(URL), "__blank"); //where URL is the URL of video
Tom
08-29-2009 9:52 AM |
Ok.
On MSDN, i found this method : System.Windows.Browser.HtmlPage.PopupWindow
What differences with Window.Navigate ?
Which is the better ?
08-29-2009 1:17 PM |
Some browsers will open a new tab with Navigate and a new window with PopupWindow.
glsp
576 points
110 Posts
08-29-2009 6:15 PM |
Another alternative is to use an html host control for silverlight. Will allow you to display your videos "inside" your silverlight app', no need to navigate away or show a new browser window. There's a few of them out there but this one is free:
http://www.divelements.co.uk/silverlight/tools.aspx
08-31-2009 7:36 AM |
Thanks for your helps.
This two solutions are very interesting. I will try both.