title: Playing youtube video using iframe in ionic 2 app
body: <p>In an Ionic 2 app, I am trying to embed one youtube video using iframe. The code looks like this:</p>
  
  <pre><code>&lt;iframe width="320" height="315" src="https://www.youtube.com/embed/VIDEOID?autoplay=1&amp;controls=1" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>However when I navigate to the page I am getting this error. I can't find a good answer how to fix this. </p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="https://googleads.g.doubleclick.net/pagead/id" rel="nofollow">https://googleads.g.doubleclick.net/pagead/id</a>. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '<a href="https://www.youtube.com" rel="nofollow">https://www.youtube.com</a>' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.</p>
  </blockquote>
  
  <p>Not sure how to fix this. Any help/lead would be appreciated.</p>
  
  <p>BTW, I am developing/testing in chrome browser developer tool.</p>
  
  <p>Thanks,</p>