All Projects → serezhka → Java Airplay Lib

serezhka / Java Airplay Lib

Licence: mit
This library is intended to easily create AirPlay2 servers acting like Apple TV

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Java Airplay Lib

shairport-sync-mqtt-display
Display currently playing info, with remote control, using shairport-sync's MQTT support
Stars: ✭ 17 (-83.17%)
Mutual labels:  airplay
Airflix
🍿 An AirPlay friendly web interface to stream your movies and TV shows from a home server.
Stars: ✭ 420 (+315.84%)
Mutual labels:  airplay
Forked Daapd
Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
Stars: ✭ 1,073 (+962.38%)
Mutual labels:  airplay
apple airplayer
Make your AirPlay devices as TTS speakers
Stars: ✭ 84 (-16.83%)
Mutual labels:  airplay
videojs-airplay
Videojs Plugin that adds an airplay button to the control bar
Stars: ✭ 28 (-72.28%)
Mutual labels:  airplay
Hifiberry Os
Linux distribution optimized for audio playback
Stars: ✭ 487 (+382.18%)
Mutual labels:  airplay
KSYAirStreamer iOS
金山云 iOS Airplay 录屏直播SDK
Stars: ✭ 44 (-56.44%)
Mutual labels:  airplay
Airplay
关于AirPlay的一些逆向研究成果。
Stars: ✭ 96 (-4.95%)
Mutual labels:  airplay
Ezplayer
基于AVPlayer封装的视频播放器,功能丰富,快速集成,可定制性强,支持react-native。
Stars: ✭ 377 (+273.27%)
Mutual labels:  airplay
React Native Ezplayer
EZPlayer component for react-native apps
Stars: ✭ 47 (-53.47%)
Mutual labels:  airplay
SSMP
Second Screen Mode Protocol allows for any iOS device to become a desktop
Stars: ✭ 58 (-42.57%)
Mutual labels:  airplay
addon-airsonos
AirSonos - Home Assistant Community Add-ons
Stars: ✭ 50 (-50.5%)
Mutual labels:  airplay
Versaplayer
Versatile Video Player implementation for iOS, macOS, and tvOS
Stars: ✭ 608 (+501.98%)
Mutual labels:  airplay
RPiPlay
An open-source AirPlay mirroring server for the Raspberry Pi. Supports iOS 9 and up.
Stars: ✭ 4,113 (+3972.28%)
Mutual labels:  airplay
Aircast Ios
aircast iOS SDK --- airplay screen mirror receiver iOS8-iOS11.3 support
Stars: ✭ 64 (-36.63%)
Mutual labels:  airplay
node-airplayhub
AirPlay server which accepts streams and then streams the audio back out to multiple AirPlay devices with sync support.
Stars: ✭ 48 (-52.48%)
Mutual labels:  airplay
Super Simple Raspberry Pi Audio Receiver Install
Super Easy installation to make your Raspberry Pi an Audio Receiver
Stars: ✭ 448 (+343.56%)
Mutual labels:  airplay
Addon Aircast
AirCast - Home Assistant Community Add-ons
Stars: ✭ 100 (-0.99%)
Mutual labels:  airplay
Balena Sound
Build a single or multi-room streamer for an existing audio device using a Raspberry Pi! Supports Bluetooth, Airplay and Spotify Connect
Stars: ✭ 1,306 (+1193.07%)
Mutual labels:  airplay
Airplay Enabler
A helper tool that enables Optimus Player to stream audio using AirPlay 2.
Stars: ✭ 32 (-68.32%)
Mutual labels:  airplay

java-airplay-lib

Build Status Release HitCount License

This library is intended to easily create AirPlay2 servers acting like Apple TV. Tested with iPhone X (iOS 14.0.1)

How to use?

  • Add java-airplay-lib dependency to your project

  • Make your server discoverable by Bonjour

  String serverName = "@srzhka";
  int airPlayPort = 5001;
  int airTunesPort = 7001;
  AirPlayBonjour airPlayBonjour = new AirPlayBonjour(serverName);
  airPlayBonjour.start(airPlayPort, airTunesPort);
  ...
  airPlayBonjour.stop();
  • Listen airTunesPort and handle RTSP requests. Pass request content bytes to the library and respond with provided content bytes.
  RTSP GET | POST

  String uri = ...
  byte[] requestContent = ...
  switch (uri) {
    case "/info": {
      airPlay.info(.. byte output stream ..);
      // RTSP OK + provided bytes 
    }
    case "/pair-setup": {
      airPlay.pairSetup(.. byte output stream ..);
      // RTSP OK + provided bytes 
    }
    case "/pair-verify": {
      airPlay.pairVerify(.. requestContent input stream ..,
        .. byte output stream ..);
      // RTSP OK + provided bytes 
    }
    case "/fp-setup": {
      airPlay.fairPlaySetup(.. requestContent input stream ..,
        .. byte output stream ..);
      // RTSP OK + provided bytes
    }
    case "/feedback": {
      // RTSP OK
    }
  }
  
  RTSP SETUP
  
    airPlay.rtspSetup(.. requestContent input stream ..,
      .. byte output stream .., int videoDataPort, int videoEventPort,
      int videoTimingPort, int audioDataPort, int audioControlPort); 
    // RTSP OK + provided bytes
      
    if (airPlay.isFairPlayVideoDecryptorReady()) {
      // start listening video data on videoDataPort 
    }
    
    if (airPlay.isFairPlayAudioDecryptorReady()) {
      // start listening audio data on audioDataPort 
    }
  
  RTSP GET_PARAMETER, RECORD, SET_PARAMETER, TEARDOWN
  
  ...
  
  DECRYPT MIRROR DATA
    
    airPlay.decryptVideo(byte[] video);
    
    airPlay.decryptAudio(byte[] audio, int audioLength);

Example server

java-airplay-server with Netty

Links

Analysis of AirPlay2 Technology

Info

Inspired by many other open source projects analyzing AirPlay2 protocol. Special thanks to OmgHax.c's author 🤯

It took me several months of sleepless nights with debugger and wireshark to make this work.

If you appreciate my work, consider buying me a cup of coffee to keep me recharged

Donate Donate

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].