1

HTML5 Audio Player is not working on my mobile theme, but it works well on my desktop theme

javascript of my html5 player:

<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:

<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:

 <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.

1 Answer 1

1

I'm sure you have noted sourceURL changes in each case.

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.

Look:

/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",;
Sign up to request clarification or add additional context in comments.

4 Comments

the sourceurl pathe of my xml file ist /wp-content/themes/audio/test6.xml
and it works well on my desktop theme, but not on the mobile theme
I d bet the problem stands in http://www.example.de/wp-content, what do you get in typing http://www.example.de/wp-content/themes/audio/test6.xmlin your desktop browser ?
Modify your mobile theme to have the same sourceUrl as desktop one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.