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);
stream.play(index);
}
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.
Eddie