Page 1 of 1

Playing playlist

Posted: 08 Sep 2009 11:27
by kpytuk
Hello,

i try to play two items from playlist. The problem is that first item plays perfectly, but when it reaches the end of playback it stops and the second items doesn't load.

Here is my simple js code

Code: Select all

vlc.addSource("http://localhost/test.flv", "Test1"); vlc.addSource("http://localhost/test2.flv", "Test2"); vlc.play(); function VLCPlayer() { this.play = function() { var playlist = this.getPlaylist(); if (playlist) { try { playlist.play(); } catch (e) { this.traceError(e) } } } this.addSource = function(url, name, options) { var playlist = this.getPlaylist(); if (playlist) { try { var id = playlist.add(url, name, options); return id; } catch (e) { this.traceError(e) } } return null; } }
When i call playlist.itemsCount, it returns 2 items. So items are in the playlist. It simply doesn't want to switch to the second file.

Any help?