【问题标题】:jPlayer not workng properly in FF5jPlayer 在 FF5 中无法正常工作
【发布时间】:2011-08-13 21:30:42
【问题描述】:

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

http://www.jplayer.org/

http://jquery.com/

在 FireFox 5(Win 7 和 Win XP)中, 音频无法播放:

http://www.disk-edits.com.au/files/female_voice_artists.php

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

但是完全相同的页面在我的本地主机上完美运行, 即使在线访问:

http://richard-walsh.dyndns-free.com/disk-edits/files/female_voice_artists.php

(如果这不再在线,那么我一定是关闭了我的电脑,但我会让它打开一段时间)

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

在线服务器正在运行旧版本的 apache/php/etc。 在线服务器也在运行linux, 我的电脑在哪里运行 Windows。 我不知道这是否相关,但我看不出任何其他差异。

编辑: 我现在尝试使用纯 HTML5 音频标签(仅使用 oga)。 它在 FF5 中仍然无法运行,但在 Chrome 中运行良好。 所以它似乎与服务器和 FireFox 有关。

【问题讨论】:

    标签: javascript jquery audio jplayer


    【解决方案1】:

    问题在于服务器发送了错误的 MIME 类型以与 .oga 文件一起使用。 要解决此问题,您只需在主目录中创建一个正确关联 MIME 类型的 .htaccess 文件。

    这是一个更新批次的示例, 最重要的是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
    

    【讨论】:

      猜你喜欢
      • 2013-10-03
      • 1970-01-01
      • 2016-12-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-14
      • 2021-04-08
      相关资源
      最近更新 更多