I'm working on a video player that pulls from an xml playlist. So far I have it success fully pulling from the following xml structure:
course chapter - looping object title (video title) screen (video location and type) description (description of video) /chapter /course
Here is what I would like to do, but am having difficulty understanding how to set it up properly:
course courseinfo label=" " chapter label =" " screen label = " " (instead of title) path= " " (url to file) type="video/mp4" /screen /chapter /courseinfo /course
here is the code that I am using:
var XML_PATH = "xml/screens.xml"; var videos_array=new Array();
description:$(this).find("description").text()}; videos_array.push(obj);
and video title $("#playlist2").append('
'); $("#playlist2").append(''+obj.title+''); });
$("#playlist2").append('
');
video tag.'); // append description $("#description").append(videos_array[0].description);
// call addListeners function addListeners(); } }); }
// add
listener function addListeners() { // loop for each list item $('#playlist2 li').each(function looping(index) { // onclick... $(this).click(function onItemClick() { // empty playlist and description $("#player").empty(); $("#description").empty(); // append video tag $("#player").append(' src="'+videos_array[index].screen+'" type="video/mp4" />Your browser does not support
the video tag.'); // append description $("#description").append(videos_array[index].description); }); }); }
Also, I want to display the course info lable in a box called #courseinfo. The player is set up with the video element on top, then I've been trying to put in the courseinfo under that, then the description, then the actual playlist.
any help would be much appreciated