Synchronous (yes, wihout 'a') playlist loading (Projekktor Core)

by Stoyicker @, Thursday, August 09, 2012, 10:41 (314 days ago) @ Stoyicker
edited by Stoyicker, Thursday, August 09, 2012, 11:46

However, I' just realized that a 'black flash' is obtained between the end of the current playlist and the beginning of the new one. I've tried to use the 'loop=true' configuration parameter along this (and this alone, too):

player.addListener('done', updatePlaylist);
			function updatePlaylist() {
				player.removeListener('done', updatePlaylist);
				console.log('Going to set the default break video.');
				player.setFile([{0:{src:'video/default.mp4', type:'video/mp4'}}]);
				player.setPlay(true);
				player.addListener('done', updatePlaylist3);
				updatePlaylist2();
            }
			
			function updatePlaylist2() {
				$.post('updatePlaylist.php', function () {
                    pl=loadJsonPlaylist();
                }).error(function () {
                    alert('Error when trying to run update.php');
                });
			}
			
			function updatePlaylist3() {
				player.setFile(pl, 'text/json');
				player.removeListener('done', updatePlaylist3);
				player.addListener('done', updatePlaylist);
				player.setPlay(true);
			}

But I keep getting the black screen if loop is false and the old playlist being repeated if it's true.

  555 views

Complete thread:

 RSS Feed of thread