iOS应用中的屏幕共享?

编程入门 行业动态 更新时间:2024-10-24 22:28:24
本文介绍了iOS应用中的屏幕共享?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我希望与运行相同应用程序的其他设备共享我的应用程序iPad屏幕。

I want share my application iPad screen with other devices which are running the same application.

更多细节:我的应用程序是会议应用程序。现在,我希望那些参与特定会议的人可以在我共享应用程序屏幕时显示我的屏幕。

More detail: My application is a meeting application. Now I want that those who are the participants of that particular meeting can my screen when I share my application screen.

结论:我想与其他设备共享我的应用程序屏幕它们运行相同的应用程序,就像Skype屏幕共享一样。

Conclusion: I want to share my app screen with other devices which have running the same app, JUST like Skype screen share.

推荐答案

您将需要一台服务器。这是一个漫长的过程。向您简要介绍详细信息

You will be needing a server for this. Its a long process. Briefing you with the overall details

  • 您可以在用户登录时获得相关信息。
  • 用户将尝试首先将图像发送到服务器。
  • 从用户屏幕连续获取屏幕截图图像。点击此链接
  • 转换图像到NSData 。
  • 从服务器检测到另一个用户(要与谁共享屏幕)。将数据发送给该用户。并将NSData转换为UIImage并相应地更新UI。
  • 循环流程。

  • You get the information when users are loggedIn.
  • User will try to send the image to the server first.
  • Get the screenshots images continuously from the user screen.follow this link
  • convert the image to NSData.
  • From server detect the other user(to whom screen is to be shared.) send the data to that user. And convert the NSData into UIImage and update the UI accordingly.
  • Loop the process.

// 用于拍摄屏幕截图

UIGraphicsBeginImageContext(self.window.bounds.size); [self.window.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); NSData * data = UIImagePNGRepresentation(image); [data writeToFile:@"foo.png" atomically:YES];

更多推荐

iOS应用中的屏幕共享?

本文发布于:2023-11-30 03:33:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1648580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:屏幕   iOS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!