title: "user friendly" vimeo embedding, get embed code from url
body: <p>I'm working on a way for the client (user) to get the iFrame from vimeo to play a different video.. this is proving more difficult for me than previously anticipated. the changing of the video has to be done via a text-box.</p>
  
  <p>if at all possible, how can i extract the embed code like this:</p>
  
  <pre><code>&lt;iframe src="https://player.vimeo.com/video/22439234?title=0&amp;byline=0&amp;portrait=0" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>from a url such as: <a href="https://vimeo.com/22439234" rel="nofollow">https://vimeo.com/22439234</a> ?</p>
  
  <p>How can i retrieve the iframe, src attribute value or anything i can use from the above example?</p>
  
  <p>I've googled around a bunch, but all instructions I have found are directed at developers...</p>
  
  <p>(I'm using Angularjs, so any Javascript or Angular solutions are acceptable)</p>
  
  <p><strong>EDIT:</strong> I found a website that does what i want, might help you understand what i want to do..</p>
  
  <p>if you paste <a href="https://vimeo.com/22439234" rel="nofollow">https://vimeo.com/22439234</a> in there and press generate, it outputs:</p>
  
  <pre><code>&lt;object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://vimeo.com/moogaloop.swf?clip_id=22439234&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff9933&amp;amp;fullscreen=1" allowfullscreen="true" allowscriptaccess="always"&gt;
  </code></pre>
  
  <p>
  <a href="http://www.tools4noobs.com/online_tools/vimeo_xhtml/" rel="nofollow">Get your own valid XHTML Vimeo embed code</a></p>
  
  <p>that's exactly what i need, except for the fact that it's not an iFrame...</p>
  
  <p><a href="http://www.tools4noobs.com/online_tools/vimeo_xhtml/" rel="nofollow">http://www.tools4noobs.com/online_tools/vimeo_xhtml/</a></p>