Full Airplay support in future builds.

  • Dear all who have been working hard to make LibreElec for our boxes.
    Do you think it is possible to make Airplay working as it should?
    Since native airplay in Kodi/OE/LE is practically useless due to its unreliability, right now I have to use Kodi on top of Android to use Airpin app for Airplay (must have for me).
    Maybe you could somehow fix Airplay or replace the whole Airplay receiver part with some new code in the future? I don’t want to rush you but Is it in your plans at all?
    Thank you!

  • Perhaps you can give Mr. Cook from Apple a quick call, and ask him to stop f*cking around with Airplay's functions every couple of months. Kodi has to reverse-engineer the whole Airplay workings, and probably for some odd reason, Apple is not too happy with that.

    In short, it can probably be fixed (again), until Apple breaks it again.

  • Just a small note on the subject.

    I have 2 Kodi instances on 2 PC's running Windows 7. AirPlay (music streaming, not mirroring or video/picture) is working on both of them. Moreover, after playing with Libreelec for a while, I learned that Airplay is working for some time after fresh install of Libreelec and after some time it just stops working - I can select Libreelec from the menu on iPhone, but when I try to actually play some music, it just drops connection saying "Unable to connect to Kodi (Libreelec)". I am not changing any settings during that time, just installing skin and library scanning. Stopping and starting Airplay and/or Avahi does not help. But when I reinstall Libreelec from scratch, it starts working again for some short time.

    I thought, maybe it is a bug and not related to the famous Airplay video and mirroring issues with Kodi.

    I am running LibreElec 7.0-devel-20160908163444-r23325-g3be647e on Minix NEO U1 from SD card. Wired Gigabit connection.
    iPhone 5s running IOS 10.0.2 (same issue with IOS 9 and IOS 7)

    If you need some logs from my system, I will be more than happy to provide them. I just thought I should ask first if there is any intention to investigate this particular issue considering general attitude (understandable) towards the whole Airplay.

    Thank you.

    Edited once, last by astep (September 30, 2016 at 6:35 PM).

  • My experience is similar on RPi3 with LibreElec 7.0.2. Airplay audio worked on initial install but then randomly stopped working from all source devices. The airplay device shows as available, but selecting it either does nothing (ios9) or gives a connection error (ios10).

    Rebooting both the RPi and the source device makes no difference - once it stops working it stays in that state.

    UNTIL! Today I figured out how to get this working again. Turn off Airplay support in Kodi settings, reboot the RPi, then re-enable the Airplay service in Kodi settings. At this point source devices can select the Kodi as an Airplay device and it works.

    I'm still unsure why it stops working. Might have something to do with the source device (e.g. ipad) losing its wifi connection temporarily, as my house has too much brick which creates a few wifi black spots. The RPi itself is ethernet connected so that's not the issue.

    Would be great to make Kodi/LibreElec more robust in this respect. It's just a matter of time until it stops working again, so I'd be happy to provide any logs or take other troubleshooting steps if that would help.

    For now - at least I have a workaround that does not require reinstalling! I hope this helps others.


  • Thus, this issue is not related to specific hardware and/or device. This is clearly a general bug.

    I tend to agree. astep - next time this happens, can you confirm that the steps I provided above temporarily resolve the issue?

    If so, it would seem there is a persistent (i.e. it survives reboot) state control related to the airplay listener that needs resetting under certain circumstances. Anyone out there with airplay knowledge who can shed light on this? I'm pretty sure I had the same issue under openelec.

    If anyone else is experiencing this issue please do post. Airplay audio is such a great feature and it is so close to being perfect.

  • I tend to agree. astep - next time this happens, can you confirm that the steps I provided above temporarily resolve the issue?

    If so, it would seem there is a persistent (i.e. it survives reboot) state control related to the airplay listener that needs resetting under certain circumstances. Anyone out there with airplay knowledge who can shed light on this? I'm pretty sure I had the same issue under openelec.

    If anyone else is experiencing this issue please do post. Airplay audio is such a great feature and it is so close to being perfect.


    Sorry for not mentioning this. Yes, exactly the same behavior. Disable AP – Reboot – Enable AP – Works for some short time then stops.
    I fully agree. This feature is essential. No pairing or anything. I don’t want to buy AppleTV for the sole purpose of Airplay.

  • It's working fine for me all the time on my cabled NUC. That said, the implementation is reverse engineered and might have bugs. You should create bug reports to the Kodi project, as this functionality is made by them and not by LibreELEC. As far as I know, there have been talks of removing the support alltogether as Apple keeps breaking the protocol.

    There's a 3rd party commercial Kodi plugin somewhere as well that has full airplay audio/video support if you search for it.


  • It's working fine for me all the time on my cabled NUC. That said, the implementation is reverse engineered and might have bugs. You should create bug reports to the Kodi project, as this functionality is made by them and not by LibreELEC. As far as I know, there have been talks of removing the support alltogether as Apple keeps breaking the protocol.

    There's a 3rd party commercial Kodi plugin somewhere as well that has full airplay audio/video support if you search for it.


    Airplay is working in Kodi on my Win7 PC thus I think it is a LE issue.

    I have tried the commercial AP plugin (Airplay Mirroring Receiver Library) but couldn't get it working on LibreElec.

  • That's an odd reasoning, I'd rather say it's a Linux issue in that case. Or perhaps an issue with your network, as it's working fine for me. Either way, this is still Kodi functionality untouched by LibreELEC.

  • It's been almost a year since I last posted on this issue.

    The issue has only been a minor irritant since I stabilised my network connection to the RPi3 with an ethernet cable. Upgrading to LE v8.11 has further reduced the impact. I will explain:

    I believe what triggers this is not having the network available when Kodi starts. If you are on wired ethernet you can test this by:

    1. Turn off wifi.
    2. Shut down RPi.
    3. Unplug ethernet.
    4. Restart RPi [or just restart Kodi - see notes below]
    5. Once Kodi is running, reconnect ethernet and wait a few seconds for IP address assignment etc.

    At this point, the network connection works; for example, I can play music from the NAS, and stream Internet radio.

    Then I check my ipad - and yes, the RPi is listed under Airplay. However if I try to actually select it and stream to it, it doesn't work. Typically it just reverts back to the local ipad playing through its speakers after a second or two.

    Now this is the point where under LE v7, I would have had to disable Airplay, reboot and re-enable Airplay and all would come good (except for the odd time when the ipad got really confused and also needed a reboot).

    Under v8.11, however, all that is needed appears to be a reboot - no need to toggle the Airplay service - and that is a significant improvement.

    Then I tried forcing the condition and used the Keymap Editor addon to map a key that restarts Kodi without rebooting the device (side note: AFAIK this can only be done via keyboard map; I cannot find a way to restart Kodi without rebooting via the GUI). This worked! It got Airplay working again with just one button press and less than 10 seconds. That represents a huge improvement over the LE v7 situation.

    One final observation:

    During this testing I found another part of Kodi that consistently shows another symptom under the same circumstances, and that is the upgrade channel. If I follow the procedure above, up to point #5 above where Airplay is not working but prior to rebooting or restarting Kodi, and go to Settings -> LibreElec Settings -> System tab, scroll down to Available Versions and hit OK, the list of Available Versions is empty, i.e. none are listed even after I have confirmed that the network connection is working by playing music from the NAS. Once I restart Kodi with a stable network connection and go back into settings, the Available Versions list returns. This is consistent - both the Airplay and Available Versions issue happen every time I restart without a network connection, and remain broken until a reboot or Kodi restart.

    Unplugging the network cable after Kodi has started does not cause this; it actually seems quite tolerant of network interruptions. The critical time for the connection to be present appears to be at Kodi startup. In fact I just now tested the procedure listed above but in step 4 I restarted Kodi rather than completely rebooting the RPi, and was able to reproduce the issue even more quickly.

    If someone else can confirm this consistent behaviour then please do and perhaps we can lodge a bug report. It would be interesting to test the issue on other hardware platforms.

    But at any rate, the issue is much less painful once understood and with the 'restart Kodi' workaround available.

  • Hi

    It is not working for me :(

    I am using Rasberry Pi 3, LibreElec 8.1.2, iOS 10.3.3 and iOS 9.3.5

    iOS9.3.5 can se the kodi, but when I select kodi on the iPad (Safari/youtube), nothing shows on the kodi

    iOS10.3.3 can not se the kodi

    What am I doing wrong?

    Br

    Jesper

  • I am sure that LibreELEC and Kodi developers know this, but most users probably do not... Devices that are approved by Apple to support Airplay have to include an authentication IC - a chip that can only be bought from an Apple approved source after Apple have approved the product design and functionality. This chip allows Apple to change some of the protocol parameters without affecting compatibility with devices which include it. Since this chip is not openly available and is not easy or possible to completely reverse engineer, no software-only implementation will keep up with Apple's changes from one iOS version to the next. I agree with nickr - Kodi should drop support for Airplay. It causes too many problems. By including it and trying to support it, Kodi could be seen to be supporting Apple's use of Airplay, whereas it would be better for all if Apple either opened up the Airplay standard or used a different open standard altogether..