crmamx Posted August 15, 2011 Share Posted August 15, 2011 I have tried everything I could find to embed an audio file (wav, midi, mp3) on a web page and get it to work on the server. I am sure the file is on the server. I can get it to work on the PC (double click html program). Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/ Share on other sites More sharing options...
AyKay47 Posted August 15, 2011 Share Posted August 15, 2011 are you using a third party player or somehting like the HTML5 <embed> tags? Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1257685 Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 15, 2011 Share Posted August 15, 2011 you may want to look at html5 video/audio embed codes. are you sure that you are pointing your file in the placed its located. sometimes, your pc and hosting server have different folder names etc. Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1257703 Share on other sites More sharing options...
crmamx Posted August 15, 2011 Author Share Posted August 15, 2011 The html5 embed tags are what I have been trying to use...with different options. Can't get any of them to work on the server. My pc files and server files have identical names. I have tried mp3, midi and wav files and I am positive they exist on the server. As a side note my video files play ok. Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1257723 Share on other sites More sharing options...
cssfreakie Posted August 15, 2011 Share Posted August 15, 2011 do you have an online example of your code that is not working? I am not a fan of w3schools but since they have an example with a horse i must link to it http://www.w3schools.com/html5/tag_audio.asp Also the browser must be ready for it Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1257765 Share on other sites More sharing options...
crmamx Posted August 15, 2011 Author Share Posted August 15, 2011 Hey John: Haven't had a chance to reply but will when I do. How did you get so far ahead of me in posts? I remember when we were about even.... Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1257898 Share on other sites More sharing options...
cssfreakie Posted August 15, 2011 Share Posted August 15, 2011 pure magic Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1257902 Share on other sites More sharing options...
crmamx Posted August 16, 2011 Author Share Posted August 16, 2011 do you have an online example of your code that is not working? I am not a fan of w3schools but since they have an example with a horse i must link to it http://www.w3schools.com/html5/tag_audio.asp Also the browser must be ready for it Here is what works on the PC. <object> <param name="autostart" value="true"> <param name="src" value="Orange_Blossom_Special.mp3"> <param name="autoplay" value="true"> <param name="controller" value="true"> <embed src="Orange_Blossom_Special.mp3" controller="true" autoplay="true" autostart="True" type="audio/wav" /> </object> This works on the PC where the html and audio are in the same file. Note that type=audio/wav. If I change that to mp3 it will not work. Here is the code I have uploaded to the server and it will not work. <object> <param name="autostart" value="true"> <param name="src" value="Orange_Blossom_Special.mp3"> <param name="autoplay" value="true"> <param name="controller" value="true"> <embed src="public_html/Web_Page_Files/Sound/Orange_Blossom_Special.mp3" controller="true" autoplay="true" autostart="True" type="audio/wav" /> </object> I have tried every variation of the embed src= that there is including putting the audio in the same folder as the program but I can't get it to work. Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1258231 Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 17, 2011 Share Posted August 17, 2011 remove public_html/ from the src. Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1258427 Share on other sites More sharing options...
crmamx Posted September 11, 2011 Author Share Posted September 11, 2011 remove public_html/ from the src. Also Web Page Files. Finally, this works: <object> <param name="autostart" value="true"> <param name="src" value="Orange_Blossom_Special.mp3"> <param name="autoplay" value="true"> <param name="controller" value="true"> <embed src="/sound/Orange_Blossom_Special.mp3" controller="true" autoplay="true" autostart="True" type="audio/wav" /> </object> Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1268061 Share on other sites More sharing options...
ZulfadlyAshBurn Posted September 11, 2011 Share Posted September 11, 2011 HAHA Quote Link to comment https://forums.phpfreaks.com/topic/244837-adding-audio-to-a-web-page/#findComment-1268063 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.