Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jPlayer在FF5中工作不正常_Javascript_Jquery_Audio_Jplayer - Fatal编程技术网

Javascript jPlayer在FF5中工作不正常

Javascript jPlayer在FF5中工作不正常,javascript,jquery,audio,jplayer,Javascript,Jquery,Audio,Jplayer,我正在使用jQuery的jPlayer来播放音频文件 在Firefox5(Win 7和Win XP)中, 音频将不会在以下位置播放: (我知道它们都是同一首歌,我只是在测试) 但是完全相同的页面在我的本地主机上工作得很好, 即使在线访问: (如果这不再在线,那么我必须关闭我的计算机,但我会让它打开一段时间) 我尝试使用相对路径和绝对路径,但没有任何改变。 我用的是mp3和oga。 这两个链接在所有其他当前浏览器(Chrome、Opera、IE、Safari)上都能正常工作; 只有FF5的

我正在使用jQuery的jPlayer来播放音频文件

在Firefox5(Win 7和Win XP)中, 音频将不会在以下位置播放:

(我知道它们都是同一首歌,我只是在测试)

但是完全相同的页面在我的本地主机上工作得很好, 即使在线访问:

(如果这不再在线,那么我必须关闭我的计算机,但我会让它打开一段时间)

我尝试使用相对路径和绝对路径,但没有任何改变。 我用的是mp3和oga。 这两个链接在所有其他当前浏览器(Chrome、Opera、IE、Safari)上都能正常工作; 只有FF5的第一个链接有问题。 它没有显示任何错误。 有什么想法吗

在线服务器正在运行apache/php/etc的旧版本。 在线服务器也在运行linux, 当我的计算机运行windows时。 我不知道这是否相关,但我看不到任何其他差异

编辑: 我现在尝试使用普通的HTML5音频标签(仅使用oga)。 它在FF5中仍然不起作用,但在Chrome中效果很好。
因此,这似乎与服务器和FireFox有关。

问题在于服务器发送的MIME类型与.oga文件不符。 要解决此问题,只需在主目录中创建一个.htaccess文件,该文件将正确关联MIME类型

这是一个更新很多的例子, 对于OGG来说,最重要的是在底部

# CSS
AddType text/css .css

# XHTML
AddType application/xhtml+xml .xhtml

# XML
AddType text/xml .xml

# XUL
AddType application/vnd.mozilla.xul+xml .xul

# Add-ons
AddType application/x-xpinstall .xpi

# SVG
AddType image/svg+xml .svg .svgz
AddEncoding x-gzip .svgz

# HTML
# Server Side Includes (SSI)
AddType text/html .shtml

# Active Server Pages 
AddType text/html .asp

# Favicons
AddType image/vnd.microsoft.icon .ico

# Macromedia
AddType application/x-shockwave-flash .swf
AddType application/x-director .dir .dcr .dxr .fgd
AddType application/x-authorware-map .aam
AddType application/x-authorware-seg .aas
AddType application/x-authorware-bin .aab
AddType image/x-freehand .fh4 .fh5 .fh7 .fhc .fh

# Adobe PDF
AddType application/pdf .pdf

# Real
AddType application/vnd.rn-realmedia .rm
AddType audio/vnd.rn-realaudio .ra .ram
AddType video/vnd.rn-realvideo .rv
AddType audio/x-pn-realaudio-plugin .rpm

# Microsoft multimedia
AddType video/x-ms-asf .asf .asx
AddType audio/x-ms-wma .wma
AddType audio/x-ms-wax .wax
AddType video/x-ms-wmv .wmv
AddType video/x-ms-wvx .wvx
AddType video/x-ms-wm .wm
AddType video/x-ms-wmx .wmx
AddType application/x-ms-wmz .wmz
AddType application/x-ms-wmd .wmd

# MPEG
AddType audio/x-mpegurl .m3u

# Binary Compressed files and archives
AddType application/zip .zip
AddType application/x-gzip .gz
AddType application/x-gtar .gtar
AddType application/x-rar-compressed .rar
AddType application/octet-stream .dmg

# Java
AddType application/x-java-applet .class

# Quicktime movies
AddType video/quicktime .mov .qt

# XBM files
AddType image/x-xbitmap .xbm

# WAV files
AddType audio/x-wav .wav

# Bittorrent
AddType application/x-bittorrent .torrent

#OGG
AddType audio/ogg .oga
AddType video/ogg .ogv
AddType application/ogg .ogg