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

  • Home
  • SEARCH
  • 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 9219925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:13:43+00:00 2026-06-18T03:13:43+00:00

Im having a problem with my jplayer script. I need jplayer to play a

  • 0

Im having a problem with my jplayer script. I need jplayer to play a playlist constructed from a json file. Here is a sample json output with one track:

{
data: {

  tracks:[
    {
    id: 8678,

    title: "Show Me",

    slug: "show-me",

    url:{youtube: "",buy: ""},

    audio:[{url: "track1.mp3",format_name: "MP3",mime_type: "audio/mpeg",}],

    image:{original: "https://d25jn4u0zlr7r6.cloudfront.net/album/8/8/iroking_tP08851bc807e123178fd1e33d98.jpg"},
     }
        ]
     }
}

Here is my script which should populate the playlist, but it doesn’t work. For now it copies all data, but I want it to only get the title, image and audio url.

<script type="text/javascript">
$(document).ready(function(){
var cssSelector = {
    jPlayer: "#jquery_jplayer_1", 
    cssSelectorAncestor: "#jp_container_1"
};
var playlist = []; // Empty playlist
};
var myPlaylist = new jPlayerPlaylist(cssSelector, playlist, options);
$.getJSON("https://api.server.com/2/radio/6/tracks?key=********************",

function(data){  // get the JSON array
    $.each(data,function(index,value){
        myPlaylist.add(value); // add each element in data in myPlaylist
    })
}); 
});
</script>

Any help would be greatly appreciated. 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-18T03:13:45+00:00Added an answer on June 18, 2026 at 3:13 am

    You need to change this code

    $.getJSON("https://api.server.com/2/radio/6/tracks?key=********************",
    
    function(data){  // get the JSON array
        $.each(data,function(index,value){
            myPlaylist.add(value); // add each element in data in myPlaylist
        })
    }); 
    

    to this code

    $.getJSON("https://api.server.com/2/radio/6/tracks?key=********************",
    
    function(data){  // get the JSON array
        $.each(data['data'].tracks, function(index,value){
            myPlaylist.add({
                title: value.title,
                artist: value.slug,
                mp3: value.audio[0].url,
                poster: value.image.original
            });
        })
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i am having problem inserting data into multiple table from one view. First
Having problem to open form in new window, script is pulled from external service.
I'am having problem in accessing json array elements. Below is the response when i
I'm having problem with the ffprobe syntax, getting print format to output default with
I'm having problem getting all the values in datalist here is the problem: I
I am having problem with Jquery tabs UI. <script type=text/javascript> $(document).ready(function() { $('.tabs').tabs(); $('.subtabs').tabs();
I`m having problem in getting an attribute from a xml object into JavaScript from
Having problem in displaying relational properties b/w two tables having one(company) to many(package_master) relationship
Im having problem in importing hotmail contacts from hotmail in php it simple give
I am having problem to get asp server element data. Here is my textbox

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.