GPUVideo-android icon indicating copy to clipboard operation
GPUVideo-android copied to clipboard

GPUPlayerView Stretches

Open vigneshwaranoptisol opened this issue 4 years ago • 3 comments
trafficstars

@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

vigneshwaranoptisol avatar Mar 25 '21 21:03 vigneshwaranoptisol

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

pablogeek avatar Oct 01 '21 21:10 pablogeek

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

dhruvitservice avatar Aug 12 '22 05:08 dhruvitservice

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

pablogeek avatar Aug 12 '22 06:08 pablogeek