Displaying youtube video in silverlight app using Javascript/jQuery
I'm converting an application from php/js/css over to c#/silverlight for a client.
In the old system, I used a URL & the jquery prettyPhoto plugin to display a youtube video.
In the new system, silverlight cannot play FLV natively.
Does anybody have a process & code for how to get my link from the silverlight app, over to a div in my aspx page hosting the 开发者_高级运维silverlight control (default.aspx), then playing the video?
Cheers,
Scott
Lets say you have this Javascript function in your host .aspx page:-
function goAheadAndPlayThatVid(urlOfVid)
{
// some code that plays the Vid
}
Now in Silverlight/C# code you can invoke this function with:-
HtmlPage.Window.Invoke("goAheadAndPlayThatVid", "urlOfVidHere");
精彩评论