如何使用monoo . zeroconf制作AirPlay接收器
本文关键字:AirPlay 接收器 制作 zeroconf 何使用 monoo | 更新日期: 2023-09-27 18:19:19
我正试图在Windows上制作一个AirPlay接收器,我偶然发现了单声道。Zeroconf http://www.mono-project.com/archived/monozeroconf/。有了这个,我试着把代码写出来。下面是代码片段:
编辑代码:
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();
我有这个作为我的参考:https://nto.github.io/AirPlay.html#servicediscovery-airplayservice.
现在我想知道我如何屏幕镜像我的设备到我的应用程序?
我从某些软件中发现iOS 9需要将功能更改为0x5A7FFFF7。然后您的服务器将被识别为视频设备。