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?