+ 5

Debug it

https://code.sololearn.com/W17QOC5hdh32/?ref=app why onclick the audio isn't being played

18th Aug 2021, 9:14 AM
|HC🇮🇳|
|HC🇮🇳| - avatar
2 Réponses
+ 2
If you use the attribute srcdoc instead of src you can use the audio tags to run the mp3/Ogg. Doing this will get rid of the pesky cross-origin problem, but in doing so you will need to use a google docs route according to this StackOverflow post https://www.w3schools.com/tags/att_iframe_srcdoc.asp https://stackoverflow.com/questions/32392072/how-to-play-google-drive-mp3-file-using-html-audio-tag
18th Aug 2021, 11:12 AM
ODLNT
ODLNT - avatar
+ 1
It has do with cross origin request . Iframe from a browser can't access cross origin frame like from sololearn to google drive . I searched a bit about it on google but seems like there is no solution for it. Check the link below (not a solution), https://stackoverflow.com/questions/50935453/unable-to-get-frame-content-uncaught-domexception-blocked-a-frame-with-origin And you can google about many more links such as above.
18th Aug 2021, 9:33 AM
Abhay
Abhay - avatar