I have a website with a textarea that prompts users to input a URL from a youtube video. Once the user saves the page (thereby saving the embed code) I would like to implement an iframe on the page so that users can see the video they embedded.
at present the code that i have looks like this, where video_URL is the textarea where the user defines the URL:
= f.text_area :video_URL, :placeholder => "Please place the URL code from your YouTube or Vimeo here.", :rows => 1
%iframe{:height => 390, :width => 480, :frameborder => "0", :src => "view?step=micro_pitch/@project.micro_pitch"}
Any help would be greatly appreciated! Thank you so much!
2 ways, the new and the old:
Save the id of the video in @video_id
-1. the new with iframe:
-2. The old with embed: