Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriber view in front of Publisher view #136

Closed
sebastianmarschall opened this issue Jul 19, 2017 · 5 comments
Closed

Subscriber view in front of Publisher view #136

sebastianmarschall opened this issue Jul 19, 2017 · 5 comments

Comments

@sebastianmarschall
Copy link

sebastianmarschall commented Jul 19, 2017

I'm trying to achieve that the Subscriber view is in a small layout in front of Publisher view. Basically like in the Basic-Video-Chat sample but only vice-versa.

It works perfectly on my Nexus 6P but when using a Nexus 5 the small subscriber view gets transparent as soon as the chat partner connects - leaving only the white corner around the FrameLayout.

Reproduce:

  1. check out the Basic-Video-Chat sample project
  2. open the MainActivity layout file ("activity-main.xml")
  3. switch the ids of the containers (@+id/publisher_container & @+id/subscriber_container)
  4. run on older?/weaker? device (can confirm for Nexus 5 and Moto G3)
@sebastianmarschall
Copy link
Author

sebastianmarschall commented Jul 20, 2017

duplicate of #115

@sebastianmarschall
Copy link
Author

Reopening because #115 did not solve my problem.
subscriberView.setZOrderOnTop(true); does not do the trick for me because then the subscriber view is also in front of all other gui elements.
Using only subscriberView.setZOrderMediaOverlay(true); does not solve the original issue (the subsriber view is not visible, see first post in this issue)

@marinaserranomontes
Copy link
Contributor

Hi @sebastianmarschall

Try using TextureViews instead of GLSurfaceView, which is what OpenTok sdk uses by default.

To enable TextureViews, you need to build the session in this way:
Session session = new Session.Builder(this, "apiKey", "sessionId")
.sessionOptions(new Session.SessionOptions() {
@OverRide
public boolean useTextureViews() {
return true;
}
}).build();

Take a look to the doc: https://tokbox.com/developer/sdks/android/reference/com/opentok/android/Session.SessionOptions.html#SessionOptions--

@marinaserranomontes
Copy link
Contributor

I’m closing this issue because it has been inactive for a few weeks. This probably means that it is not reproducible or it has been fixed.

Please reopen if you still encounter this issue You can also contribute directly to samples by providing a patch.

Thank you!

@asatour
Copy link

asatour commented Jul 31, 2018

I've posted the solution here: opentok/opentok-react-native#122 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants