Goto the tuts section, Read My API tutorial.
It has everything you will need to access Youtube API and all of it's features
can you guys help me to figure out how to make a youtube video player using VB 2008. I found a code - >
.... but its not working. When I press the play button, it just loads -> connecting...bla bla not playing. Any help out there?Code:Dim Str As String = TextBox1.Text.Replace("/watch? v=", "/v/") AxWindowsMediaPlayer1.URL = Str
thank you
Goto the tuts section, Read My API tutorial.
It has everything you will need to access Youtube API and all of it's features
Lol you can find almost anething in your sig tuts >.<
yea i want to know this too
could be usefull
I think you have 2 errors here:
1: You have used a space between ? and v (/watch? v=), so no replacement will take place.
2: I think windows media player cannot load swf ('/v/' loads swf not flv).
Here is what you need to do in order to play:
Create a project.
On the toolbox, right click any item and click "Choose Items" as shown;
Now select the "Shockwave Flash Object" from the COM components and click "OK".
Now the object will appear in the toolbox. Drag it to the form and dock it to the container.
Rename the control to "Ytube".
Double click the form and write the following code:
[php]'Replace the videoID with your video ID
Dim videoID As String = "https://www.youtube.com/watch?v=vnMqkZmuEC0"
'The replacement was your first mistake.
videoID = videoID.Replace("/watch?v=", "/v/")
ytube.Movie = videoID
[/php]
Enjoy the video
API > then anything, best to study it
Right, But I assume this is a Full player,
Flash Player with Static or modified URL is not a Youtube Video Player,Originally Posted by threadstarter/OP
,That code can play any flash url. so in a sense it is a flash player.
Why not take advantage of full integration,
All you are doing is embedding flash and taking advantage of it by navigating to a URL.
API will allow you to use your own buttons, own GUI, etc etc, PLus you can do video searches, and play other videos, as opposed to requiring the user to enter in a url or location (in this case or above example, the player is static, if you add a textfield to replace it being static, it still requires a c&p url, using API negates that) yes more complex, but also more advanced, doesn't hurt to learn
Last edited by NextGen1; 03-18-2010 at 11:37 AM.
MJLover (03-18-2010)
Ya, agree !!! I made 1 with the API long time ago. API is really superb. Gives you every minute detail. Best for making a completely customized Youtube.
The reason I posted the little tutorial after your post about API is that he asked for a simpler solution and he can't even do string replacement correctly and API will be difficult as hell for him !!
Last edited by MJLover; 03-18-2010 at 11:50 AM.
NextGen1 (03-18-2010)
Agreed, Still worth the read , Web Services will be needed sooner or later, in future cases there is almost no way to learn how to use custom web services, so best bet is to start with something that has some documentation is all
MJLover (03-18-2010)
@ Closing,
Unless
A. Op (thread starter) Requests Close
B. Issue is marked Solved (resolved)
C. Or me or mods deem it so
This thread stays open (no offense) this will be a beneficial thread and as discussed in another instant, if good can come from it, no need to close it.
In the mean time, no reason to close it.