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

GPUPlayerView Stretches #81

Open
vigneshwaranoptisol opened this issue Mar 25, 2021 · 3 comments
Open

GPUPlayerView Stretches #81

vigneshwaranoptisol opened this issue Mar 25, 2021 · 3 comments

Comments

@vigneshwaranoptisol
Copy link

vigneshwaranoptisol commented Mar 25, 2021

@MasayukiSuda @jianinz @eschmar @Link184 @kifio

Implemented GPUPlayerView with Custom Layout which extends FrameLayout,
Added GPUPlayerView in it,

Video Stretches, unable to find out the best way to achieve CenterCrop or CenterFit

Codes:

public class GPUFilterVideoPlayerView extends LinearLayout {
  public GPUFilterVideoPlayerView(ThemedReactContext reactContext) {
        videoPlayer = new SimpleExoPlayer.Builder(context).build();
        videoPlayer.setVideoScalingMode(Renderer.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING);
        gpuPlayerView = new GPUPlayerView(context);
        gpuPlayerView.setSimpleExoPlayer(player);
        gpuPlayerView.setLayoutParams(new ViewGroup.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
        gpuPlayerView.setPlayerScaleType(PlayerScaleType.RESIZE_FIT_HEIGHT);
        gpuPlayerView.onResume();
        addView(gpuPlayerView);
  }
}

Please help me to find out and fix the issue, thanks in advance

@pablogeek
Copy link
Contributor

Same issue here, did you find a solution? @vigneshwaranoptisol

@dhruvitservice
Copy link

dhruvitservice commented Aug 12, 2022

@vigneshwaranoptisol @pablogeek
Anyone find proper solution for this problem?
Please help me ASAP.

@pablogeek
Copy link
Contributor

sorry @dhruvitservice I haven't been able to fix it

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