Results 1 to 4 of 4

Thread: Understanding PlaylistItem indexes when calling Stream.next() and removeFromPlaylist

  1. #1

    Question Understanding PlaylistItem indexes when calling Stream.next() and removeFromPlaylist

    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:

    Code:
    item0 - index 0
    item1 - index 1
    item2 - index 2
    item3 - index 3
    Wowza starts playing item0.
    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:

    Code:
    item1 - index 1
    item2 - index 0
    item3 - index 1
    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).

    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

  2. #2
    Join Date
    Dec 2007
    Posts
    25,881

    Default

    What you are trying to do, alter a running playlist, doesn't work at present. This technique can be used instead for dynamically changing stream content.

    A future version of Wowza 3 will probably make it possible to alter a running playlist.

    Richard

  3. #3

    Default

    Ok, thanks a lot, it works.

  4. #4

    Default

    I fixed this problem in the following patch:

    WowzaMediaServer3.0.3-patch12.zip

    Charlie

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •