Watching full-screen videos using C# Web Browser - c#

I'm currently working with Visual Studio and Windows Forms. I want to be able to watch full-screen videos from sources such as Youtube and Vimeo.
I am attempting to do this with a Web Browser but I get issues where the web browser opens YouTube and attempts to download something and Vimeo reports that there could be an issue and refuses to play the video. I already know the URL's of each video as they are responses to inputs.
What would be the best way to watch videos using a Windows Form?
At the moment I am currently just using;
webBrowser1.Navigate("http://www.youtube.com")

You need to embed the video on a web browser control...
check out the following thread on MSDN

I was plagued with the issue that my browser did not support HTML5, although I had IE 11 installed and it did not go away.
I found that using a Shockwave Flash Object was the best method to display movies/youtube videos. I simply added the component to the form and entered the desired movie and worked as intended, I'll use web browsers for non-media content.

Related

Enable Flash plugin in WPF using CEFSharp

I'm developing a WPF application using Cefsharp. This web browser inside the app should show some flash contents. I found some forum where the users suggest to use papi flash or pepper flash for Cefsharp.
I have no idea how to implement those plugin in my project.
I'm using the last version of Cefsharp.
Someone can explain how to enable Flash contents in my webview?
Thanks
You need to download the PPAPI version of Flash. Every computer running your app must do the same. Visit http://get.adobe.com/flashplayer/otherversions/ and select FP [xx] for Chromium and Opera where [xx] is the current version number, which is 26 at the time of this answer.

Can't play videos with webbrowser control

I have a webbrowsercontrol and I want to play videos from youtube and vimeo.
At first I couldn't even load youtube.com and it was saying that I had to eneble javascript, so I did and I added this IsScriptEnabled="True" property in <phone:WebBrowser/> and then the page loaded, But when I press on a video to play it says "video not available" on youtube, and "your phone can't play this video" on dailymotion.
I used this code:
VideoStream.Navigate(new Uri("http://www.dailymotion.com/", UriKind.Absolute));
I'm not sure about the exact problem but i think it's flash related. I had the same problem when I used WebBrowser.
If noone else has a better solution you could at least use this solution for youtube videos:
a video link ends like this: watch?v=XXXXX
just add &html5=1 to enforce html5 video playback. --> watch?v=XXXXX&html5=1
If you want to only show the video: --> https://www.youtube.com/embed/XXXX?&autoplay=1&rel=0&html5=1
As far as I know, if the Internet explorer in your machine can play the flash video, then the “WebBrowser” control in .Net framework can also do this, so please make sure the IE in your machine works fine with the flash ActiveX control.

Is there a Webbrowser control that supports html5 video (WebRTC) available for .Net?

I was looking for a way to embed a page that hosts WebRTC video such as the demo from http://www.webrtc.org/demo into a WinForms app so the user doesn't need to install nor launch any external browsers that may contain toolbars, etc, I looked into a few components such as GeckoFX and WebKit.Net but they fail to load the webcam video.
Do you know of any hack or other project that may support WebRTC inside .Net?
Thanks a lot
Chromium Embedded Framework claims to support WebRTC (I haven't confirmed it myself).
https://code.google.com/p/chromiumembedded/
http://en.wikipedia.org/wiki/Chromium_Embedded_Framework
WebRTC is supported by Mozilla Firefox:
http://www.webrtc.org/
If you want to embed Firefox in you project you can easily embed GeckoFX web browser control in your Windows Forms application.
The GeckoFX engine (Mozilla Firefox) says it can use WebRTC. This seem to be right (as far as I have seen yet) but there seem to be a problem with some parts of it. I'm using it actual for WebRTC and have a problem with the video part - see here: Embedded GeckoFx in C#.NET - WebRTC Video not working

Windows Form Application Inside An ASP.NET Page?

I have a game I made in windows form and an asp.net website(with a masterpage)
I made a new page in the website called game.aspx and I want that users could play the game inside the website (inside a frame, not another window)
It is possible to host a WinForms user control in a web page, but it is only supported in Internet Explorer, and even there the support is poor.
I would rather suggest that you package the game as a ClickOnce application that you deploy from your web site.
Edit:
If you REALLY want to do it you will find many examples on the web. Try this google search: http://www.google.com/search?q=user+control+host+winforms+web+page+html
This article from codebetter.com looks interesting for example:
http://codebetter.com/petervanooijen/2007/06/18/including-a-winforms-user-control-in-an-asp-net-web-page/
If the game is HTML/JavaScript based then you're all set. But if the game is written in WinForms there is no way to host it from within a webpage without it being installed on the client's machine and using some kind of container (like ActiveX) and some fancy footwork.
You probably want to look at Silverlight or Flash or even HTML5. Implement your game in one of those and it can be played inside the client's browser.

play youtube music in application

Does anyone know how to play music from youtube in my c# .net 4.0 app ? I've installed all the apis and sdks from google but i can't seem to find a tutorial that lets me play music in my desktop app .
regards,
Alexandru Badescu
If it's an asp.net application, you can just embed an object tag in your markup. Check out the "<embed>" button to get the tag info for an individual video.
If it's a Windows Forms or WPF desktop application, why not just embed a browser control with the same tag?
Either way, you should be able to just make the object tag invisible and still be able to hear the music.
Here's a tutorial on how to put youtube videos into an MVC app it should help.
http://webpangea.blogspot.com/2009/12/youtube-ms-mvc-and-jquery.html

Categories