+ 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
6 Antworten
+ 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.
+ 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.
+ 4
Unfortunately, you are right - you can't use this video source.
+ 4
You're welcome.
Just keep coding... 👍
+ 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?
+ 1
thanks