2

I am trying to make an AirPlay receiver on Windows and I stumbled upon Mono.Zeroconf http://www.mono-project.com/archived/monozeroconf/. With this, I tried to put up the code. Here is the code snippet:

EDITED CODE:

RegisterService airplayService = new RegisterService();
RegisterService raopService = new RegisterService();

TxtRecord airplayTxtRecord = new TxtRecord();
TxtRecord raopTxtRecord = new TxtRecord();

raopTxtRecord.Add("txtvers", "1");
raopTxtRecord.Add("ch", "2");
raopTxtRecord.Add("cn", "0,1,2,3");
raopTxtRecord.Add("da", "true");
raopTxtRecord.Add("et", "0,3,5");
raopTxtRecord.Add("md", "0,1,2");
raopTxtRecord.Add("pw", "false");
raopTxtRecord.Add("sv", "false");
raopTxtRecord.Add("sr", "44100");
raopTxtRecord.Add("ss", "16");
raopTxtRecord.Add("tp", "UDP");
raopTxtRecord.Add("vn", "65537");
raopTxtRecord.Add("vs", "130.14");
raopTxtRecord.Add("am", "AppleTV2,1");
raopTxtRecord.Add("sf", "0x4");

raopService.Name = macAddress + "@" + "AirPlay Receiver";
raopService.RegType = "_raop._tcp";
raopService.ReplyDomain = "local.";
raopService.UPort = 49152;
raopService.TxtRecord = raopTxtRecord;
raopService.Register();

airplayTxtRecord.Add("deviceid", macAddress);
airplayTxtRecord.Add("features", "0x39f7");
airplayTxtRecord.Add("model", "AppleTV2,1");
airplayTxtRecord.Add("srcvers", "130.14");

airplayService.Name = "AirPlay Receiver";
airplayService.RegType = "_airplay._tcp";
airplayService.ReplyDomain = "local.";
airplayService.Port = 7000;
airplayService.TxtRecord = airplayTxtRecord;
airplayService.Register();

I had this as my reference: https://nto.github.io/AirPlay.html#servicediscovery-airplayservice.

Now I wonder how do I screen mirror my device to my app?

anton
  • 21
  • 3
  • It seems that the Mono.Zeroconf nuget package does not work. I can't publish any service. I tried to do a workaround by building the project in https://github.com/mono/Mono.Zeroconf/ and I used the .dlls (Mono.Zeroconf.dll and Mono.Zeroconf.Providers.Bonjour.dll). This workaround enabled my app to publish the service. However, publishing an AirPlay service is not enough. I also needed to publish an RAOP service. See the edited code snippet. Now My iOS device is able to detect my app. However, the AirPlay functionality is just for Audio. I need the screen mirror functionality – anton Oct 29 '15 at 07:48
  • Did you ever get this working? I'd like some other help if you're willing. Thanks – Lemuel Botha May 12 '17 at 16:42

1 Answers1

0

I have discovered for iOS 9 from certain software , that you need to change features to 0x5A7FFFF7. Then your server will be recognized as video device.

Allender
  • 604
  • 4
  • 10