/java-airplay-server

Acts like Apple TV

Primary LanguageJavaMIT LicenseMIT

java-airplay-server

Build Status Release HitCount License

This is example of java-airplay-lib usage.

It's under development.

How to use?

  • Add java-airplay-server dependency to your project

  • Implement MirrorDataConsumer and start AirPlayServer, for example:

  String dumpName = "dump.h264";
  var fileChannel = FileChannel.open(Paths.get(dumpName), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE);

  MirrorDataConsumer h264Dump = data -> {
      try {
          fileChannel.write(ByteBuffer.wrap(data));
      } catch (IOException e) {
          e.printStackTrace();
      }
  };

  String serverName = "AirPlayServer";
  int airPlayPort = 15614;
  int airTunesPort = 5001;
  new AirPlayServer(serverName, airPlayPort, airTunesPort, h264Dump).start();

More examples

see repo java-airplay-server-examples