[英]Opentok / Vonage screenshot sample for Android return solid green image
您能否尝试使用以下代码并让我知道您是否能够拍摄发布者的快照?
(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.