如何将触摸事件从一个应用程序发送到另一个应用程序
我已经开发了屏幕铸造应用程序。我正在使用Twilio建立连接,但我想将接收器(参与者)与发件人(主机)作为实时数据共享触摸事件。有什么可能简化这一点的解决方案吗?
I have developed screen casting app. I am making connection using twilio but I want to share touch events from receiver(participant) to sender(host) as a live data. Is there any possible solution to simplify this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 Twilio Video 进行此连接,则可以使用 DataTrack API 通过您的连接发送任意数据。
您可以创建一个
LocalDataTrack
对象:将其连接到房间,方法是在连接时将其作为
tracks
选项的一部分发送,或者在连接后将其发布到房间已经做了。消息发布后,您可以沿着数据轨道发送消息:
并且您可以通过订阅轨道并侦听
message
事件来接收数据轨道消息:请参阅 文档了解更多详细信息。
If you are using Twilio Video for this connection then you can use the DataTrack API to send arbitrary data over your connection.
You can create a
LocalDataTrack
object:Connect it to a room, either by sending it as part of the
tracks
option when connecting, or by publishing it to the room after a connection has been made.You can send a message down the data track once it is published:
And you can receive data track messages by subscribing to the track and listening for the
message
event:See the documentation for more detail.