Problem with video uploading

Hi all, Hope u all are doing well. I am supposed to build a website using Ruby on Rails in which the user should be able to upload his/her video to YouTube via a form in my application. I have no idea how to use Youtube API in Ruby on Rails. I have the client ID and developer_key which are useful in Youtube API. I do not know which steps must be followed for implementing this.

Hope anyone of u will help me out solving this problem.

Any help would be greatly appreciated.

Thanks...

I can't help you with using the API. However, I did find this method helpful for _displaying_ the videos

def youtube_video(url, width=600, height=nil)     height ||= (width*355/425).floor     url = url.gsub('watch?v=', 'v/')     "<object type=\"application/x-shockwave-flash\" data= \"#{url}&rel=0\" width=\"#{width}\" height=\"#{height}\"><param name= \"movie\" value=\"#{url}&rel=0\" /><param name=\"FlashVars\" value= \"playerMode=embedded\" /></object>" end

The url argument is simply the URL from youtube. This way, the users don't have to use YouTube's "embed this" text, (which some find confusing) and instead I can impose my own parameters such as width/ height/etc.

I'm sorry I couldn't help more.

rizwana wrote: