Results 1 to 2 of 2

Thread: Play playlist item by name

  1. #1

    Default Play playlist item by name

    I've created an HTTPProvider than creates and manages server-side playlists and streams. I can play a playlist item by index, but I couldn't find a way to play it by name. Is there a method available?

    Currently, I have this method that plays by index.
    public void switchPlaylistItem(IApplicationInstance app, String streamName, Integer index) {
    		Stream stream = (Stream)app.getProperties().getProperty(streamName);;
    Here is what my current playlist object looks like:

    [{PlaylistItem: index: 0,name: "livestream",start: -2,length: -1}, {PlaylistItem: index: 1,name: "sample.mp4",start: 0,length: -1}]
    Thanks in advance.


  2. #2


    Figured it out. I had to loop through the playlist items and check for the existence of a playlistitem object with that name. If so, then return the index of the object and then play that index. Here is sample code:

    int index = -1;
    List<PlaylistItem> items = playlist.getItems();
    		for (int i = 0; i < items.size(); i++) {
    				index = items.get(i).getIndex();

Similar Threads

  1. Playlist Module set item ?
    By burakguder in forum Wowza Streaming Server Java API
    Replies: 0
    Last Post: 02-17-2015, 07:58 AM
  2. Current item playing in vod playlist
    By piotrb in forum Video On Demand Streaming Discussion
    Replies: 12
    Last Post: 04-02-2012, 08:10 AM
  3. streamname group playlist file item path
    By koffieschaap in forum AddOn: Transcoder
    Replies: 2
    Last Post: 11-14-2011, 07:47 AM

Posting Permissions

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