twilio / twilio-video-app-android

A collaboration application built with the Twilio Video Android SDK
Apache License 2.0
242 stars 98 forks source link

Add Primary Participant Video View Zoom for Screen Sharing #194

Open Alton09 opened 3 years ago

Alton09 commented 3 years ago

Is your feature request related to a problem? Please describe. Currently it is difficult to see text on a an Android phone while viewing a screen share.

Describe the solution you'd like The ability for the user to zoom in on the primary participant view when a remote participant is sharing their screen.

atonoyan commented 2 years ago

Hi @Alton09 , Have you succeeded in finding the solution for this case?

andob commented 2 years ago

@Alton09 @atonoyan how I did implement this feature:

  1. found a zoomable texture view library, say this one
  2. copied ZoomableTextureView.java into the project
  3. renamed the class into ZoomableVideoTextureView
  4. let it extend VideoTextureView instead of TextureView
  5. replaced VideoTextureView with ZoomableVideoTextureView in the XML layout file

Edit: It's not the best solution, since it zooms the content after it gets rendered into the view with VideoTrack.addSink. Small text can get pixelated on some devices in portrait mode. But it's a decent workaround.