Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:21:43+00:00 2026-06-08T11:21:43+00:00

I have a list of audio files which comes from database. They start playing

  • 0

I have a list of audio files which comes from database. They start playing after clicking on the row. Now I want to automatically play the first audio file after page load. Everything is implemented well but Jquery Player is not initializing or any other problem with this. Can any body please help me about the same.

 function playAudioFile(objid,title,filePath)
 {
   speaker_id = "speaker_"+objid;
   rowid = "rowid_"+objid;
   $('.datagridtable tr').removeClass('current_playing');
   $('.black_speaker').removeClass('black_speaker');

   $('#'+rowid).addClass("current_playing");
   $('#'+speaker_id).addClass("black_speaker");

  $('#jquery_jplayer').jPlayer('setFile', filePath).jPlayer('play');
  $('#jplayer_playlist ul li').html(title);
   showPauseBtn();
  }  



 $(document).ready(function() {
   playAudioFile('12','abasdfasdf','pathtofile')
 });

a) FileBug is not giving any error.

b) I am sure the problem is with jplayer initialization but dont know how to tackle it.

This is the demo url http://webcartz.stagetesting.com/playlist

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:21:45+00:00Added an answer on June 8, 2026 at 11:21 am

    You’ve put playAudioFile(); inside $(document).ready() this is the problem because the player is not yet ready and can’t fulfill your request.

    There doesn’t seem to be an autoplay function in the docs but according to http://jplayer.org/latest/developer-guide/#jPlayer-constructor-event-handlers what you need to do is use the ready event.

    This is probably in player.js

    $("#jquery_jplayer").jPlayer({
        ready: function ()
        {
            //////////////////////////////////////
            //
            // ADD HERE CODE TO PLAY THE FIRST 
            // ITEM IN THE PLAYLIST
            //
            //////////////////////////////////////
            showPauseBtn();
        },
        ativeSupport: true, oggSupport: false, customCssIds: true, swfPath:'jPlayer/'
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have list of files which contain particular patterns, but those files have been
which are the jars used to record video from the list of jar files
I have a list of audio files like this, int music_numbers[] = { R.raw.one,
I have list of structure. I want to modify a particular data from the
I have list of textareas. For textareas I use tinyMCE Editor. When I start
I have List I want to sort Desc by Priority, which is int and
I have a set of mp3 files on my computer which i want to
I have a list of strangely encoded files: 02 - Charlie, Woody and You/Study
I have some larger files which I need to share with people and to
I have save file in sdcard/media/audio/ringtone s folder. That file will appear in list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.