• Airplay Introduction

       AirPlay is a proprietary protocol stack/suite developed by Apple Inc. that allows wireless streaming between devices of audio, video, device screens, and photos, together with related metadata. Originally implemented only in Apple's software and devices, it was called AirTunes and used for audio only. Apple has since licensed the AirPlay protocol stack as a third-party software component technology to manufacturers that build products compatible with Apple's devices

       Airplay has 4 main functions: music playing, video playing, picture playing, and mirror playing.The picture playing function has been removed after iOS9, and the picture display is using mirror function.

  • Airplay Mirror

    To realize the mirror Server end function of AirPlay, we should consider it from the following aspects:discovery process/negotiation process/video transmission/decryption process

    Discovery Process

       Using Bonjour, you can refer to mDNSResponder, jmdns, and register two services: airtunes and airplay, AirplayTxt, and RaopTxt can be filled in with demo, and the values can be modified according to their own requirements.
    It needs to be noted as follows:
    Airtunes: "12345@wirelessdisplay", "_raop._tcp."
    Airplay: "wirelessdisplay", "_airplay._tcp."
    The parameter "_airplay._tcp." and "_raop._tcp." can not be modified.
    After publishing the service, the Server terminal should be searched in the IOS device.

    Negotiation Process

    the process of airplay sdk
    the process of airplay sdk
    the post process of airplay sdk
    the post process of airplay sdk
    the post process of airplay sdk
    the post process of airplay sdk
    the setup process of airplay sdk
    the setup process of airplay sdk
    the setup process of airplay sdk
    the setup process of airplay sdk
    the rtsp process of airplay sdk
    the rtsp process of airplay sdk

       Pair-setup, pair-verify pairing verification, the server responds according to the received information, and the format is similar to RTSP

    Fp-setup (first and second), related to Fairplay.

       The first setup phase will receive a large string of data, which is generated according to the plist format. The corresponding methods can be used to obtain ekey and eiv information for subsequent decryption.

    The second setup phase obtains the type, determines the video data or audio data by type, notifies the receiving end to establish a transmission channel ready for the transmission of audio and video data, and the encrypted screen image data is sent to the receiving through the designated port (generally 7100). end.

    After receiving the transmitted data, the receiving end decrypts the decrypted data, and the decrypted data can be played.

       There may also be GET_PARAMETER, SET_PARAMETER to adjust the volume and other information.

    Video Transmission

       Transmission is transmitted using TCP protocol, audio is AAC, and video data is H264.

    Decryption Process

       There are currently two main methods for decrypting the part:

    1. Get it from apptv or macOS.

    2. Obtained from the existing screenable products available on the market.

    All Posts
    ×