Hi, I have used the YouTube api to extracta set amount of video''s, is anyone aware of how I can show these in a player on my ruby on rails site? are there any plugins that may help? cheers jon -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jon wrote:> > Hi, > > I have used the YouTube api to extracta set amount of video''s, is anyone > aware of how I can show these in a player on my ruby on rails site? > > are there any plugins that may help? > > cheers > jon >See: http://shanesbrain.net/articles/2006/11/21/ruby_youtube_library_0_8_0_released --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
awesome post...but is there a way to just embed a particular youtube video with an id? i see only options for feature, user, get by tag, and friends of user. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
koloa wrote:> > awesome post...but is there a way to just embed a particular youtube > video with an id? i see only options for feature, user, get by tag, > and friends of user. >Sure. You can either use video_details(video_id) to find all the details for the video (and also make it dead simple to display, or just use the code from #embed_html -- all it does is wrap the id in html, like this: <object width="#{width}" height="#{height}"> <param name="movie" value="#{embed_url}"></param> <param name="wmode" value="transparent"></param> <embed src="#{embed_url}" type="application/x-shockwave-flash" wmode="transparent" width="#{width}" height="#{height}"></embed> </object> where width and height are passed to the embed_html method and where embed_url is generated from the video''s page on YouTube by @embed_url = @url.delete(''?'').sub(''='', ''/'') So, you don''t actually need to even use the gem if you know the id, and could generate the embedded video yourself using something like "http://www.youtube.com/v/#{youtube_id}" HTH --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
koloa wrote:> awesome post...but is there a way to just embed a particular youtube > video with an id? i see only options for feature, user, get by tag, and > friends of user.yeah, I discovered it can be done easily by using this code below <object width="371" height="306"><param name="movie" value="http://www.youtube.com/v/<%=params[:video_id]%>&autoplay=1" /><embed src="http://www.youtube.com/v/<%=params[:video_id]%>&autoplay=1" type="application/x-shockwave-flash" width="371" height="306"></embed></object> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks job for sharing! jon wrote:> koloa wrote: >> awesome post...but is there a way to just embed a particular youtube >> video with an id? i see only options for feature, user, get by tag, and >> friends of user. > > yeah, I discovered it can be done easily by using this code below > > <object width="371" height="306"><param name="movie" > value="http://www.youtube.com/v/<%=params[:video_id]%>&autoplay=1" > /><embed > src="http://www.youtube.com/v/<%=params[:video_id]%>&autoplay=1" > type="application/x-shockwave-flash" width="371" > height="306"></embed></object>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---