AUDIO IN HTML | Sololearn: Learn to code for FREE!
+ 2

AUDIO IN HTML

I wrote this code but it's not working why? <audio controls autoplay loop> <source src=" https://youtu.be/uOIHHMnI_Ig " type="audio/mpeg"> Audio element is not supported by your browser. </audio>

17th Mar 2018, 2:46 PM
Hammad Yaqub
Hammad Yaqub - avatar
14 Réponses
+ 9
The reason is the url is pointing to a resource which refer to a webpage, but not a media as the Youtube video was embeded in the webpage. ūüėČ
17th Mar 2018, 3:10 PM
Zephyr Koo
Zephyr Koo - avatar
+ 5
You need to put an actually video file. Not some Youtube link. Try to download this video, and upload this somewhere online. Then use that link here.
17th Mar 2018, 3:36 PM
Aaron Stone
Aaron Stone - avatar
+ 5
the gamer Just head to Youtube desktop site and open the video. The code example is available by clicking SHARE and EMBED. ūüėČ
19th May 2018, 8:39 PM
Zephyr Koo
Zephyr Koo - avatar
+ 4
have the results came yet
19th May 2018, 6:02 PM
Yesh Jadav
Yesh Jadav - avatar
+ 4
the gamer You may open the Youtube video and copy the embed video url to display it via iframe. ūüėČ
19th May 2018, 8:16 PM
Zephyr Koo
Zephyr Koo - avatar
+ 4
I think you should go with this problem may be solved in my opinion https://www.sololearn.com/Discuss/1291724/?ref=app
19th May 2018, 8:23 PM
Yesh Jadav
Yesh Jadav - avatar
+ 4
Zephyr Koo it sucks on iframe
19th May 2018, 8:24 PM
Yesh Jadav
Yesh Jadav - avatar
+ 4
Yesh Jadav Yes iframe is a little bit inconvenient sometimes but it's possible to make it responsive. ūüėČ
19th May 2018, 8:42 PM
Zephyr Koo
Zephyr Koo - avatar
+ 4
yes it looks pretty good on higher resolutionZephyr Koo check out my solution
19th May 2018, 8:44 PM
Yesh Jadav
Yesh Jadav - avatar
+ 3
ok thanks
17th Mar 2018, 4:07 PM
Hammad Yaqub
Hammad Yaqub - avatar
+ 2
Yesh Jadav not yet
19th May 2018, 7:50 PM
Hammad Yaqub
Hammad Yaqub - avatar
+ 2
ok thanks
19th May 2018, 8:17 PM
Hammad Yaqub
Hammad Yaqub - avatar
+ 2
when you have time pls you can send me an example of code
19th May 2018, 8:18 PM
Hammad Yaqub
Hammad Yaqub - avatar
+ 1
Como puedo poner de fondo un audio de youtube?
11th Aug 2020, 7:03 PM
Damiano Pellegrino Cazaux