+ 11
Good Evening. Everyone. Please I need help with adding a background music to a page. I have tried using <embed> .
I'm struggling with how to get it working. especially none of my links work. can anyone suggest a music(audio) hosting site? • And secondly, with an iframe.. it gives me Error, display forbidden X-Frame option.. solution please.. I need it.. thanks
13 ответов
+ 9
oo cool, nice.. I'll consider JavaScript as well too..
+ 8
great thanks, will give you a feed back
+ 8
I'll try it all and give the feed back.. working on a code☺
+ 8
yes I do.. I tried them all but, the audio won't play, and I frame gave me errors...
+ 8
but Kirk gave an answer to that to which I'm gonna consider
+ 7
This covers HTML5 and embedding two audio formats:
http://www.tudor-anghelina.com/2013/10/using-html5-audio-tag-to-add-background.html
Little details I remember from other places / threads:
- Mobile is picky about autostarting audio; I think it's a privacy/security issue for some reason. In contrast, I'm able to generate tones without first getting permission (so if your music is MIDI-like, you might be able to play that automatically) -- otherwise just a heads up.
- People often host audio at dropbox (I also use github for static content). SoloLearn Q&A has several examples of this, just search for "audio".
- iframes have additional security concerns. It's in the same area as cross-origin scripting; basically the server getting its content embedded in the iframe needs to give permission for outside control.
If you have something you could put in CodePlayground, it will help with more specific answers (especially as another wave of people comes online later)
+ 6
wow, thanks, I'll try github and see what the outcome is! and, I copied the link from YouTube.. so meaning YouTube dasnt permit it I think
+ 6
and I'm going to search for "Audio "from the Q/A. thank you very much.. please stick around 😁 might ask more questions
+ 5
I'm using the YouTube API here:
https://code.sololearn.com/WY2xou48ucG4/?ref=app
There are more examples when searching SL codes, like this one using an iframe... [HTML] line 154:
https://code.sololearn.com/W5hf01oDu3o7/?ref=app
+ 1
try using the <audio> tag