Kodi Community Forum

Full Version: Detect Airplay?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Is it possible to somehow detect when XBMC receives an Airplay stream (audio) and then execute a command?

I was hoping to do the following:

- Use XBMC as an Airplay receiver (audio)
- Send some music via Airplay from my laptop
- XBMC detects the signal and sends a CEC command to my AVR to turn it on

I've been searching quite a bit to see if this is possible and how, but without luck. I have no CEC capable device at the moment, but am planning to buy something like a cubox in the future.

Thanks in advance for any help.
You would need a python service addon which registeres the monitor api and on the "onplaybackstarted" callback checks the playback item for "pipe://"). ATM only airplay audio uses the pipe:// protocol so you could use this as indicator for airtunes music streaming.
I've no actual idea of where to begin now, but at least I have some extra terms to google! Thanks!
Just have a look at this source for a start (its a service addon which just seeks back a number of seconds after unpausing a move and exactly implements the monitor interface with the OnPlaybackStarted callback and so on).

https://github.com/Memphiz/script.xbmc.unpausejumpback