如何强制Opera播放mp3?
我使用jPlayer,在mozilla - 一切都很好,播放mp3,但Opera不会:( 如果我使用ogg,Opera播放,但mp3 ...... :( oggSupport:Boolean :(默认值:false):使用OGG格式的浏览器在HTML5中启用ogg支持。但如果我把“假”仍然没有帮助......
示例:http://global-news.com.ua/page_113.html?unitId=11501正好位于页面中间
var fff = [{
title:"Sleep Away",
mp3:"http://www.global-news.com.ua/audio/Sleep_Away.mp3",
oga:"http://www.jplayer.org/audio/ogg/Miaow-02-Hidden.ogg"
},
{
title:"Maid with the Flaxen Hair",
mp3:"http://www.global-news.com.ua/audio/Maid_Hair.mp3",
oga:"http://www.jplayer.org/audio/ogg/Miaow-02-Hidden.ogg"
},
{
title:"Kalimba",
mp3:"http://www.global-news.com.ua/audio/Kalimba.mp3",
oga:"http://www.jplayer.org/audio/ogg/Miaow-02-Hidden.ogg"
}];
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, fff, {
swfPath: "../i.files/JS",
supplied: "mp3, oga",
wmode: "window",
oggSupport: false,
smoothPlayBar: true,
keyEnabled: true
});
尝试:
var fff = [{
title:"Sleep Away",
mp3:"http://www.global-news.com.ua/audio/Sleep_Away.mp3"
},
{
title:"Maid with the Flaxen Hair",
mp3:"http://www.global-news.com.ua/audio/Maid_Hair.mp3"
},
{
title:"Kalimba",
mp3:"http://www.global-news.com.ua/audio/Kalimba.mp3"
}];
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, fff, {
swfPath: "../i.files/JS",
supplied: "mp3",
wmode: "window",
oggSupport: false,
smoothPlayBar: true,
keyEnabled: true
});
但没有帮助:(
答案 0 :(得分:1)
Opera不支持标记音频上的Mp3格式。 JPlayer为非原生格式提供“Flash Fallback”功能。 要启用它,您必须:
以这种方式将solution:"flash,html"
添加到您的代码中:
var fff = [{
title:"Sleep Away",
mp3:"http://www.global-news.com.ua/audio/Sleep_Away.mp3"
},
{
title:"Maid with the Flaxen Hair",
mp3:"http://www.global-news.com.ua/audio/Maid_Hair.mp3"
},
{
title:"Kalimba",
mp3:"http://www.global-news.com.ua/audio/Kalimba.mp3"
}];
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, fff, {
swfPath: "../i.files/JS",
solution:"flash,html"
supplied: "mp3",
wmode: "window",
oggSupport: false,
smoothPlayBar: true,
keyEnabled: true
});
试试吧!