The basic sample project of OpenTok shows how to make a VideoCall, showing the subscribers videostream in a small frame above the publishers stream.
I'm trying to achieve the same, only vice versa. Problems:
setZOrderMediaOverlay(true); setZOrderOnTop(true);
The problem with this approach is that now the publisher stream is on top of everything, even the android gui which is not tolerable for my use case.setZOrderMediaOverlay(true);
does not work. The publisher view still is invisble.Any idea on how to achieve this?
Try using TextureViews instead of GLSurfaceView, which is what OpenTok sdk uses by default.
To enable TextureViews, build your session in this way:
Session session = new Session.Builder(this, "apiKey", "sessionId")
.sessionOptions(new Session.SessionOptions() {
@Override
public boolean useTextureViews() {
return true;
}
}).build();
That will make the Publisher and Subscriber objects use TextureViews for its rendering.
Oficial doc is here