Hi,
I'm trying to write a playlist manager: I'like to dynamically add and remove playlist items to the playlist.
But I'm getting a strange behaviour from wowza about playlist item indexes (and consequently which item wowza plays next).
I start by enqueing 4 items in the stream by calling Stream.play(name, start, length, false).
Let's say the playlist is as follows:
Wowza starts playing item0.Code:item0 - index 0 item1 - index 1 item2 - index 2 item3 - index 3
Now I invoke Stream.next(), and wowza starts playing item1.
Since I want to keep in the playlist only the items that still must be played, then I invoke Stream.removeFromPlaylist("item0"); the item is correctly removed from the playlist but indexes change as follows:
Quite strange! Moreover, now if I invoke Stream.next() then wowza starts playing item3 (therefore skipping item2 that was intended at this stage to be the next).Code:item1 - index 1 item2 - index 0 item3 - index 1
The purpose of removing played items is because new items may be added dynamically for very long runs, so I don't want the playlist to keep thousands of played items.
Maybe I'm missing something about playlist item indexes.
Any help?
Thanks


Reply With Quote
