Vig
Vig

Reputation: 143

Iframe video on Android Hybrid App with Phonegap

I embedded a youtube video on my index.html file.

<iframe id="video" width="640" height="360" src="//www.youtube.com/embed/xxxxxxxxx?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

How can I fix this?

Upvotes: 1

Views: 2525

Answers (2)

Vig
Vig

Reputation: 143

Solved.

I simply added http: in link on the src attribute.

<iframe id="video" width="640" height="360" src="HTTP://www.youtube.com/embed/xxxxxxxxx?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

Upvotes: 1

cforcloud
cforcloud

Reputation: 589

You should probably white list youtube.

http://cordova.apache.org/docs/en/3.6.0/guide_appdev_whitelist_index.md.html

<access origin="http://*.youtube.com" />

Upvotes: 2

Related Questions