public class BroadcastTest extends VlcjTest {
public static void main(String[] args) throws Exception {
MediaPlayerFactory factory = new MediaPlayerFactory();
MediaManager manager = factory.newMediaManager();
// First set up all of the broadcasts...
// Client MRL: rtp://@230.0.0.1:5004
manager.addBroadcast("Movie1", "/movies/Movie1.iso", "#rtp{dst=230.0.0.1,port=5004,mux=ts", true, false);
// Client MRL: rtp://@230.0.0.1:5005
manager.addBroadcast("Movie2", "/movies/Movie2.iso", "#rtp{dst=230.0.0.1,port=5005,mux=ts", true, false);
// Next play all of the broadcasts
manager.play("Movie1");
manager.play("Movie2");
// Dump out some information about the media (these methods return JSON)
System.out.println("Movie1: " + manager.show("Movie1"));
System.out.println("Movie2: " + manager.show("Movie2"));
// Wait forever
Thread.currentThread().join();
}