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