[英]javascript: HTML5 Audio Player
HTML5 Audio Player is not working on my mobile theme, but it works well on my desktop theme HTML5音频播放器不适用于我的移动主题,但适用于我的桌面主题
javascript of my html5 player: 我的html5播放器的javascript :
<script type="text/javascript">
$(document).ready(function(){
$("#JQAudioPlayer1").fdAudioPlayer({sourceURL:"/player_files/test6.xml",swfURL:"http://example.de/player_files/jplayer.swf",solution:"html,flash",mouseWheelEnabled:true,trackAutostart:false,trackRandom:true,trackRepeat:true,trackVolume:70,trackTitleScrollEnabled:true,trackTitleScrollDuration:5000,trackTitleScrollDelay:3000,trackTitleFormat:"_ALBUM_ - _TRACK_",timeShowHour:false,seekBarTipEnabled:true,playlistState:"expanded",playlistAnimationEasing:"easeOutQuad",playlistAnimationDuration:200,playlistButtonEnabled:true,playlistButtonString:"PLAYLIST",playlistVisibleRowCount:7,playlistAutoResize:false,thumbnailsScrollingStep:1,thumbnailsScrollingDuration:500,thumbnailsScrollingEasing:"easeOutQuad",thumbTipEnabled:false});
});
html code of the player on desktop theme: 桌面主题上播放器的html代码:
<script type="text/javascript">
$(document).ready(function(){
$("#JQAudioPlayer1").fdAudioPlayer({sourceURL:"/wp-content/themes/audio/test6.xml",swfURL:"/player_files/jplayer.swf",solution:"html,flash",mouseWheelEnabled:true,trackAutostart:false,trackRandom:true,trackRepeat:true,trackVolume:70,trackTitleScrollEnabled:true,trackTitleScrollDuration:5000,trackTitleScrollDelay:3000,trackTitleFormat:"_ALBUM_ - _TRACK_",timeShowHour:false,seekBarTipEnabled:true,playlistState:"expanded",playlistAnimationEasing:"easeOutQuad",playlistAnimationDuration:200,playlistButtonEnabled:true,playlistButtonString:"PLAYLIST",playlistVisibleRowCount:7,playlistAutoResize:false,thumbnailsScrollingStep:1,thumbnailsScrollingDuration:500,thumbnailsScrollingEasing:"easeOutQuad",thumbTipEnabled:false});
});
html code of the player on mobile theme: 移动主题上播放器的html代码:
<script type="text/javascript">
$(document).ready(function(){
$("#JQAudioPlayer1").fdAudioPlayer({sourceURL:"http://www.example.de/wp-content/themes/audio/test6.xml",swfURL:"/player_files/jplayer.swf",solution:"html,flash",mouseWheelEnabled:true,trackAutostart:false,trackRandom:true,trackRepeat:true,trackVolume:70,trackTitleScrollEnabled:true,trackTitleScrollDuration:5000,trackTitleScrollDelay:3000,trackTitleFormat:"_ALBUM_ - _TRACK_",timeShowHour:false,seekBarTipEnabled:true,playlistState:"expanded",playlistAnimationEasing:"easeOutQuad",playlistAnimationDuration:200,playlistButtonEnabled:true,playlistButtonString:"PLAYLIST",playlistVisibleRowCount:7,playlistAutoResize:false,thumbnailsScrollingStep:1,thumbnailsScrollingDuration:500,thumbnailsScrollingEasing:"easeOutQuad",thumbTipEnabled:false});
});
Any help would be appreciated. 任何帮助,将不胜感激。
I'm sure you have noted sourceURL
changes in each case. 我确定您已经注意到每种情况下
sourceURL
更改。
This is why your player fails. 这就是您的播放器失败的原因。 He certainly cannot find files.
他当然找不到文件。
You should find where the sourceURL
path is generated, and ensure it is the same for all. 您应该找到在何处生成
sourceURL
路径,并确保所有路径都相同。
Look: 看:
/player_files/test6.xml ≠ /wp-content/themes/audio/test6.xml /player_files/test6.xml≠/wp-content/themes/audio/test6.xml
{sourceURL:"**/player_files/test6.xml**",swfURL:"**http://example.de/player_files/jplayer.swf**",
{sourceURL:"**/wp-content/themes/audio/test6.xml**",swfURL:"**/player_files/jplayer.swf**",solution:"html,flash",
{sourceURL:"http://www.example.de/wp-content/themes/audio/test6.xml",swfURL:"/player_files/jplayer.swf",;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.