Finchsize
Finchsize

Reputation: 935

WPF/C# webbrowser youtube

I want to play youtube movie in my application by using webbrowser.

The problem is about autoplay movies.

I know i can use embeded, but on embeded version its impossible to navigate the website.

Is there any solution how to autoplay youtube movies?

Upvotes: 0

Views: 1813

Answers (2)

Adam92
Adam92

Reputation: 436

Google have actually made available an API which allows you to do this kind of thing across all platforms, whether it be in a web or application interface. You can find the documentation for it here. But as a guide, here is what you can do....

All you have to do is replace parts of the URL, which can be done easily with string manipulation. I have specifed link a - which is the normal youtube link, and b - which is the API link which can play in full screen mode (or size of your frame or web browser) and many other features which you can command through the URL.

a - http://www.youtube.com/watch?v=DuLPSz_Hffw

b - http://youtube.googleapis.com/v/DuLPSz_Hffw?autoplay=1&showinfo=0&loop=1

Hope that helps!

Upvotes: 0

Trewqa
Trewqa

Reputation: 214

You can use a specific control 'COM' to show a movie 'swf' in a form, called 'Shockwave Flash Object'

And Swf Url Movie:

http://www.youtube.com/v/[CODE VIDEO]&autoplay=1

Upvotes: 1

Related Questions