Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

can anyone help point me in the right direction, i've read the same instructions on a variety of sites, and i can't seem to find a clear explanation of what i need to do or read up on :(

http://apiblog.youtube.com/2011/01/introducing-javascript-player-api-for.html[^]

I am trying to run the above code in a webbrowser control in a Visual Studio 2010 - VB form, and despite days reading through peoples advice on the subject, I can't quite make the breakthrough as to understand why the javascript loading functions don't work in a visual basic webbrowser control, when they work perfectly well in IE or Firefox, and what i need to do to get the api working in this environment. I've read a lot of material on using the document.invokescript function, but i'm a bit puzzled about how it relates to the above code.

All i really want to do is load a video into a windows form, and call the play control from the form code, if i could either get the above code to work in a windows form control (any would do) or find an alternative means, it would be great.

I haven't included any source from the project, because it is simply a webbrowser.navigate to a page containing the above html/javascript. It works fine in a standard browser environment, but in a webbrowser control it's as if the javascript bit is disabled.

This seems to me like a really simple problem, but it's out of my comfort area, and despite days of reading, i'm still waiting for that penny drop moment :s

Many Thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900