+ 2

Y its showing an Error?

In output i want both video and audio play separately <audio src="http://www.sololearn.com/uploads/audio.mp3" type="audio/mpeg" controls> </audio> <iframe src=" https://youtu.be/tHeHm_EX_sI">My video</iframe> I wonder where I m wrong

6th Oct 2017, 5:29 AM
AppInventor
AppInventor - avatar
6 Answers
+ 6
Edit : In case that error is something as "X-Frame-Options sameorigin" you can't do nothing. You can't set X-Frame-Options on the iframe. That is a response header set by the domain from which you are requesting the resource (https:/youtu.be/... in your example) . They have set the header to SAMEORIGIN in this case, which means that they have disallowed loading of the resource in an iframe outside of their domain. For more information seeThe X-Frame-Options response header on MDN.
6th Oct 2017, 3:48 PM
LukArToDo
LukArToDo - avatar
+ 4
try: <iframe src="https://youtu.be/embed/tHeHm_EX_si" width="420" height="345">My video</iframe> I think that "embed" is key of your problem. Set the width and height of the value which you want, and if you have them defined in css, ignore that part.
6th Oct 2017, 12:13 PM
LukArToDo
LukArToDo - avatar
+ 4
Unfortunately, you are right - you can't use this video source.
7th Oct 2017, 1:00 PM
LukArToDo
LukArToDo - avatar
+ 4
You're welcome. Just keep coding... 👍
7th Oct 2017, 1:18 PM
LukArToDo
LukArToDo - avatar
+ 1
lukar Todo thanks man the error is exactly wt u mentioned above If m not wrong, did u mean I can't play this bcoz the owener of that video doesn't allow me to do so?
7th Oct 2017, 12:56 PM
AppInventor
AppInventor - avatar
+ 1
thanks
7th Oct 2017, 1:15 PM
AppInventor
AppInventor - avatar