6890e40556ba7e589b7fc95aeb0009f5a5464909
By:
david26

audio code to my html website

December 24, 2014 751 views

hello ,geeks ;) i have added an audio code to my html website it works good offline but when i am upload the website to my server it does not works .

the code ;

**<audio autoplay >
  <source src ="audio.mp3" type='audio/mpeg; codecs="mp3"'>
  <source src ="audio.ogg" type='audio/ogg; codecs="vorbis"'>
  <source src ="audio.wav">
  </audio>**  | 

my .htacess :

AddType application/x-httpd-php .html
AddType application/x-shockwave-flash swf

AddType TYPE/SUBTYPE EXTENSION
AddType audio/mpeg mp3
AddType audio/mp4 m4a
AddType audio/ogg ogg
AddType audio/ogg oga
AddType audio/webm webma
AddType audio/wav wav

RewriteEngine On
# you can add whatever extensions you want routed to your php script
RewriteCond %{REQUEST_URI} \.(doc|zip|mp3|ogg|wav|pdf)$ [NC]
RewriteRule ^(.*)$ /download-file.php?filename=$1 [L]

IndexIgnore *

<ifModule mod_php5.5.c>
 php_value zlib.output_compression 16386
</ifModule>

DirectoryIndex index.html

AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/scss
AddOutputFilterByType DEFLATE ogg
AddOutputFilterByType DEFLATE wav
AddOutputFilterByType DEFLATE mp3
AddOutputFilterByType DEFLATE svg
AddOutputFilterByType DEFLATE otf
AddOutputFilterByType DEFLATE eot
AddOutputFilterByType DEFLATE ttf
AddOutputFilterByType DEFLATE woff
AddOutputFilterByType DEFLATE scss/scss
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/png
AddOutputFilterByType DEFLATE image/jpeg
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE image/gif
AddOutputFilterByType DEFLATE js/js
AddOutputFilterByType DEFLATE css/css
AddOutputFilterByType DEFLATE js
AddOutputFilterByType DEFLATE css
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-gzip .gz .gzip
AddOutputFilterByType DEFLATE application/zip .zip
1 comment
Be the first one to answer this question.