JSON Playlist - What is wrong? (Projekktor Core)

by Stoyicker @, Monday, August 06, 2012, 22:48 (316 days ago)

Hi,

I'm after using the playlist feature. I've got a playlist in a XML file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<playlist>
<vid src="P_CULTURAL TV.f4v" />
<vid src="P_ANIMACION.f4v" />
</playlist>

It would be very useful for me to directly load the playlist from a XML file instead having to generate a JSON file, which would cause huge changes in my software. However, since the code for 'alternate-playlist.xml' shown at the end of the playlist docs is not published, I'm not able to adapt it (obviously I've already tried loading it directly).

Could anyone tell me how must I structure the XML file so the playlist can be loaded from the file? Or, if it's not possible, tell me why this doesn't work?:

[{"0":{"src":"video\/intro.mp4","type":"video\/mp4"},config: {
				disablePause: true,
		        disallowSkip: true
			}},{"0":{"src":"video\/intro.mp4","type":"video\/mp4"}}]

I've written it as an adaptation of the server.php file.

This is my document.ready:

<script type="text/javascript">
$(document).ready(function() {
    projekktor('#player_a', {
	volume: 1,
	enableFullscreen: true,
	continuous: true,
	playlist: [
		{
			0:{src:'playlist.php', type:'text/json'}
		}
	]
    });
});
</script> 
  794 views

Complete thread:

 RSS Feed of thread