虽然屏幕共享总是从 Quickblox Android SDK 中出错

While screen sharing always getting error from Quickblox Android SDK

我一直在尝试集成屏幕共享功能,但 Quickblox SDK 总是抛出异常 “启动屏幕共享失败纹理宽度必须为正,但为 0”

我一直在关注他们的官方文档并遵循来自

的所有说明

https://docs.quickblox.com/docs/android-video-calling-advanced#screen-sharing

确保已指定屏幕尺寸,即共享屏幕前需要定义以下参数,

QBRTCMediaConfig.setVideoWidth(QBRTCMediaConfig.VideoQuality.VGA_VIDEO.width)
QBRTCMediaConfig.setVideoHeight(QBRTCMediaConfig.VideoQuality.VGA_VIDEO.height)