Hi, i need to load a playlist string of videos instead an xml, i proved generating an xml in memory but doesn't work.

Could you help me?. thanks

var videos="<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\"> <trackList> <track> <title>U2</title> <location>http://www.youtube.com/watch?v=co6WMzDOh1o</location> </track> <track> <title>DAVID GUETTA</title> <location>http://www.youtube.com/watch?v=YVw7eJ0vGfM</location> </track> <track> <title>IT DOESN't WORK</title> <location>http://www.youtube.com/watch?v=OBi5Wkr3BII</location> </track> <track> <title>Matagascar III</title> <location>http://www.youtube.com/watch?v=g8evyE9TuYk</location> </track> </trackList> </playlist>";

var xml = $.parseXML(videos);

$(function() {
        $("#osmplayer").osmplayer({
          width: '100%',
          height: '650px',
          autoplay: true,
          autoNext: true,
          showcontrols: true,
          playlist:xml,
        });

Comments

notecortes’s picture

to help any other users this is the solution:

'playlist': {
total_rows: 10,
nodes: [{
title: 'Track 1',
mediafiles: {
media: {media: 'http://youtube.......'},
image: {image: 'http://path_to_img'}
}
},
{
.... other nodes ......
}]
}

Thank you again Travis!

travist’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.