I'm playing with my application which runs under .net 4 and would like to watch youtube videos there (the application is something like a MediaCenter).
I also would like to play/pause with buttons, so for my understanding I could use youtube's api for javascript?
I'm currently using Webbrowser control to show videos or is a better solution out there?
Thanks for your advises
Regards
Related
I am trying to embed YouTube video in C# winforms webbrowser using this code:
webBrowser_q.Navigate("https://www.youtube.com/embed/OsHFxQSOkNU?autoplay=1&controls=0&enablejsapi=1&iv_load_policy=3&rel=0&showinfo=0&showsearch=0&start=0&end=0");
Unfortunately I get only black window instead of the video.
What am I doing wrong?
EDIT: I don't want to use AS3 player, because I want to use YouTube IFrame API.
You can find your answer here:
C# webbrowser Ajax call
According to this answer: "WebBrowser control (both WPF and WinForms versions) behaves in many ways differently from the full IE. You may want to implement Feature Control to bring its behavior as close to IE as possible (particularly, FEATURE_BROWSER_EMULATION)."
You can see the code sample that is given there. I was able to play a youtube video while before I saw a black screen and javascript errors.
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?
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
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!
I'm currently working on a website project in asp.net that hosts videos in many different languages. They are in a series of 12 videos so I'd like to be able to embed one video player on the web page and then be able to click a next button and the next video in the list would play. I'd also like to be able to do the save thing with a previous button as well. Also is there a way to play and pause the video with custom controls? I did some research on it and I found some answers in Javascript but then I went to the apple documentation and it said you can no longer use it due to security reasons.
Does anyone have any solutions for any of these? Preferably in asp.net C# but anything will help. Thanks!
This should be doable using the code on apple's website. In fact, I just tried it using ordinary anchor hyperlinks to play and pause a movie. Works fine. Didn't try loading a new url, but it should work too. The security restriction only applies to calling javascript from a QuickTime movie. (Which btw can still be achived using an iframe).
I want build an application on web which records the audio sound through Mic.
If any one can provide some appropriate approach or some links would be helpful.
also if you can suggest some third party control which is free.
The technology for Implementation - ASP.NET , C#
Since you are looking to use C#, check out Silverlight 4 which added microphone support to Silverlight. Here is a tutorial on accessing the microphone in Silverlight 4. Scratch Audio is a great example of a Silverlight support with microphone support.
javascript does not give mic support. You would have to include another technology to do this.
I know flash supports microsoft input. It might be the best place to start. I don't know if silverlight has these features.
The only other things i can think of would be an activeX control for IE, or a standalone application. Both of these look like much worse approaches
You can use flash to record from microphone and upload it to a server. For the server you can use Red5 which is great open source server.
Here are some examples:
http:// => fms.denniehoopingarner.com/
http:// => mariofalomir.com/blog/?p=101
(Sorry but i can only post 1 hyperlink)
I'm building a WPF application that should be able to play Youtube videos. But there are some problems running the app on Windows 7.
When I follow the article by Sacha Barber it shows a pop-up saying "File download security warning" which isn't very nice, I don't want the user to have to click ok every time.
Then there's a second approach. Use the WebBrowser's NavigateToString property and enter there a full HTML code for a page that plays the Youtube video. Unfortunately, that doesn't work for me at all, all I see is a black space where the video should be.
Have you ever come across anything like this? Thanks a lot.
I wrote a simple YouTube video viewer in WPF, and went down the NavigateToString route and built up the web page source by hand, using the embed code provided by YouTube, and this worked a treat (other than the fact several of the videos on YouTube are marked as unable to embed, so you get a link to view on the full site instead). I created an attached property to avoid any code behind too.
What is the code you are using?