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

Add Pinch-to-Zoom to Primary Video #152

Open
tihimsm opened this issue Mar 10, 2021 · 7 comments
Open

Add Pinch-to-Zoom to Primary Video #152

tihimsm opened this issue Mar 10, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@tihimsm
Copy link

tihimsm commented Mar 10, 2021

I want to display the screen shared video from the web on iOS.

I was able to display it, but specifying scaleAspectFit for the VideoView's contentMode reduces the resolution.

Specifying scaleAspectFill for contentMode, solves the resolution problem, but it cuts off the screen.

Is there a solution to this problem?

@timrozum
Copy link
Contributor

Hi @tihimsm,

You could try one of these solutions:

  1. Make the size of the video view larger so that aspectFit does not reduce resolution as much.
  2. Adjust aspect ratio of video view so that aspectFill does not crop as much of the video.
  3. Adjust the video capture dimensions that the web is using to better fit iOS devices.

I would also suggest providing a screenshot if this doesn't help.

@timrozum timrozum self-assigned this Mar 10, 2021
@timrozum
Copy link
Contributor

Actually I forgot for a second that this was for screen share. Solution 3 above isn't really an option then. I think you have the right idea using aspectFit and aspectFill in combination with adjusting the size and aspect ratio of the video view.

@tihimsm
Copy link
Author

tihimsm commented Mar 11, 2021

@timrozum

Thank you for your ideas.
I've already tried 1 and 2 of your ideas and it did work as expected.

However, I want to start with a small screen state (specifically, aspectFit to fit the width of the screen) and then enlarge the screen.
Therefore, I want to display on a small screen with high resolution.

@timrozum
Copy link
Contributor

@tihimsm ok do you mean you want the user to be able to pinch to zoom in and scroll the video image around?

@tihimsm
Copy link
Author

tihimsm commented Mar 11, 2021

@timrozum
Yes, I want it.
At that time, I am in trouble because the initial resolution is low.
Do you have any ideas?

@timrozum
Copy link
Contributor

Got it. We also would like to add this feature to our demo app in the future.

We do not have any example code for this currently. However I think you may want to look at popular image viewer examples. I think an image viewer that zooms and scrolls would be similar. I think it would probably involve placing the video view inside a scroll view and incorporating a gesture recognizer.

@timrozum timrozum transferred this issue from twilio/twilio-video-ios Mar 11, 2021
@timrozum
Copy link
Contributor

@tihimsm I have transferred this issue to our demo app repo so it gets prioritized better. Thanks for the feedback!

@timrozum timrozum added the enhancement New feature or request label Mar 11, 2021
@aaalaniz aaalaniz changed the title Question: About the resolution of web screen sharing Add Pinch-to-Zoom to Primary Video May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants