在actionscript中刷新Camera.names
在 actioscript 中,我可以从 Camera.names 获取用户相机。 它可以找到,但有时用户仅在应用程序启动后才连接相机。 当应用程序已经运行时,在连接或断开相机连接时,它不会更新 Camera.names 列表。
有没有办法更新 Camera.names 列表?
谢谢
In actioscript I can get the user cameras from Camera.names.
It works find but sometimes users connect the camera only after the app is started.
When the app is already running it doesn't update the list of Camera.names when connecting or disconnecting a camera.
Is there a way to update the Camera.names list?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
遗憾的是,这是不可能“绑定”的,因为当调用相机名称完成时,Flash Player 不会收到新连接的“通知”。
我过去所做的就是每分钟轮询一次 Camera.names,或者在用户添加相机时在列表旁边有一个“刷新”按钮。
就您而言,轮询机制似乎是更好的方法(当然取决于您的用户界面)。
Sadly, this is something that's not possible to 'bind' since when the call for the Camera names is done, the Flash Player doesn't get a 'notice' of the new connection.
What I have done in the past is have something poll Camera.names every minute or have a 'refresh' button next to the list for when the user does add a camera.
In your case, it seems to have a polling mechanism is the better approach (depending on your UI of course).