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!
Related
Ok, so my client wants a feature where the person should be able to find an image through google during their game. I'm not sure, the only idea I've had would be to basically screen record the specific application then apply it as a texture to a cube. It is also in VR so the Chrome searching has to be done specifically in application. Any suggestions?
you could do a screen capture kind of thing -
i stumbled upon a video when i was trying to get some embeded browser functionality going:
https://www.youtube.com/watch?v=lMLSACaaOjU
as the above shows you could take a capture based off of a certain click then whatever texture coding would come after that capture
also on the asset store there are assets which are costly that already contain embedded web browser depending on the platform.
https://assetstore.unity.com/packages/tools/gui/embedded-browser-55459
https://assetstore.unity.com/packages/tools/gui/3d-webview-for-android-137030
aside from that you would have to program the results returned from the google web search request made (unitywebrequest) and allow your client to select the image
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'm programming a Windows 8 RT app that uses the API of Rotten Tomatoes. It gives me access to trailers/clips of the selected movie. I checked out the link and it appears all of the links are online Flash movies.
I tried playing around with the 'WebView' control and the 'MediaElement', but none seem to satisify my needs.
Is it even possible to play Flash movies. If not what are my options?
If you code like this <WebView Source="http://www.rottentomatoes.com/m/last_vegas_2013/trailers/11178829" />, you can see it's opening whole page. Good thing is that video gets play. So you need to remove the non-relevant portion using InvokeScript method & JavaScript. I don't know too much JS otherwise I would have give you proper solution.
I am confident JS will help you, the reason is this app itself. It's basically a Facebook website with RELEVANT portion.
Disclaimer: I am not the owner of that app.
Also check out this feature request.
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'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?