Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi does any one know if it is posseble either to use java code directly in a C# windows/Form application so i can display a youtube video directly on the form and also call event to a chromeless youtube player? or is there an other way around to display a chromeless youtube player on a form?

my first idea was to load a asp webform application into a webbrowser but this gies 2 problems: 1, i cant see a asp site in a webbroser without a asp server witch wont show up if i try to run the asp in a broser. 2, i cant edit the webform from my win-form (disable buttons, call events on form button click etc.)

an other thing i've tried was the shockwave flash player but this is not an option due to lack of events and so on.

I am also using the google and youtube API but it seems they wont be able to show or play a video in anything else than java and .net (asp).

so what i want is a way to have a youtube control (chromeless player) in a win-form that i can call events on and modify basicly everything with my form, and the youtube and google api or even java script if this is possble, if any of you out there could help just some how i would be very thanksfull. TY

-Jackie

- EDIT:
my dream could be to have it look abit like this: http://code.google.com/intl/da-DK/apis/youtube/youtube_player_demo.html[^] just displayed in a win-form with possability to call event on the video etc.
Posted
Updated 21-Sep-11 9:56am
v3

Two solutions to run Java in your WinForm
1. Run your java control inside separate process with hidden main window and pass handle of that control to your C# application
2. You can use JNBridge; refer at http://www.jnbridge.com/[^]
 
Share this answer
 
Comments
Jackie00100 22-Sep-11 9:47am    
okay ty alot what way would you say is the best to use? i guess running in a separate window may end up in being very messy to work with over time?
Hi i've found out that i can make a HTML java page and load it into a webbrowser control and then use webbrowser.document.InvokeScript("scriptname") and on that how do more or less everything i want directly from a button click and so on.
also it works fine with the youtube java api so this is what i've done so far since it is both easy and simple and work very well like i wanted.
 
Share this answer
 
Comments
Nagy Vilmos 23-Sep-11 6:56am    
Mark this as answering your question.

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