繁体   English   中英

Android 的 Opentok / Vonage 屏幕截图示例返回纯绿色图像

[英]Opentok / Vonage screenshot sample for Android return solid green image

我们尝试了 Opentok 提供的代码示例来捕获发布者的屏幕截图,但它不起作用。 它返回纯绿色屏幕。 有人可以提供工作代码示例吗?

您能否尝试使用以下代码并让我知道您是否能够拍摄发布者的快照?

(publisher?.view as TextureView).bitmap //captures publisher's snapshot

(subscriber?.view as TextureView).bitmap //captures subscriber's snapshot

要使用以上内容,请确保在 sessionOptions 中启用 textureView,如下所示:-

session = Session.Builder(this, apiKey, sessionId).sessionOptions(object : Session.SessionOptions() {
            
            override fun useTextureViews(): Boolean {
                return true
            }
        }).build().also {
            it.setSessionListener(sessionListener)
            it.connect(token)
        }

让我知道事情的后续。

暂无
暂无

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

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