简体   繁体   English

在 opentok Android 中截取订阅者的屏幕截图

[英]Take screenshot of subscriber in opentok Android

I want to take screen shot of subscriber frame in opentok Android .我想在 opentok Android 中截取用户框架的屏幕截图 I am able to take screen shot of other xml components but not able to take screenshot of the opentok subscriber.我能够截取其他 xml 组件的屏幕截图,但无法截取 opentok 订阅者的屏幕截图。

Can anyone help me for this?任何人都可以帮助我吗?

Thanks in advance.提前致谢。

If you only need to take a screenshot of the subscriber video, you could have a look at this sample repository , You just need to add ScreenshotVideoRenderer to your subscriber object and call ((ScreenshotVideoRenderer) subscriber.getRenderer()).saveScreenshot() to get the subscribers screenshot which is stored in phone storage.如果您只需要对订阅者视频进行截图,您可以查看此示例存储库,您只需将 ScreenshotVideoRenderer 添加到您的订阅者 object 并调用 ((ScreenshotVideoRenderer)subscriber.getRenderer()).saveScreenshot() 到获取存储在手机存储中的订阅者屏幕截图。 Let me know in case you need any further assistance required from my side.如果您需要我方面的任何进一步帮助,请告诉我。

Thanks谢谢

Arjun: We tried the code sample provided by Opentok ( https://github.com/opentok/opentok-android-sdk-samples/tree/main/Live-Photo-Capture-Kotlin ) but it is not working. Arjun:我们尝试了 Opentok 提供的代码示例( https://github.com/opentok/opentok-android-sdk-samples/tree/main/Live-Photo-Capture-Kotlin ),但它不起作用。 It captures green screen.它捕获绿屏。 Do you mind sharing your code?你介意分享你的代码吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM