twilio / video-quickstart-android

Twilio Video Quickstart for Android
MIT License
213 stars 160 forks source link

All VideoScaleType / tviScaleType settings crop video #730

Closed KamilSucharski closed 1 year ago

KamilSucharski commented 1 year ago

Description

No matter what scale type I select the video is always cropped. I also experimented with the view size (wrap_content, match_parent, static 300dp x 300dp square) and it was still cropped in all cases.

Steps to Reproduce

  1. Use the code below for view.
  2. Connect to a room.

Code

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/black">

        <com.twilio.video.VideoTextureView
            android:id="@+id/videoCallRemoteView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:isVisible="@{viewModel.roomManager.isDoctorCameraEnabled}"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:remoteVideoTrack="@{viewModel.roomManager.doctorVideoTrack}"
            app:tviScaleType="fit" />

Expected Behavior

Whole scene should be visible regardless of phone orientation. The view size should adjust, or at least black bars should be added to fill in the space.

Actual Behavior

The video is cropped: obraz

Reproduces how Often

Always.

Logs

Logs are not relevant here I think.

Versions

All relevant version information for issue.

Video Android SDK

7.4.0

Android API

33

Android Device

Google Pixel 6a

afalls-twilio commented 1 year ago

@KamilSucharski thank you for reporting this issue. A ticket regarding this issue has been filed and while we are in the midst of a large release and as soon as that is accomplished we will begin addressing more issues (including this one). Thank you for your patience.

afalls-twilio commented 1 year ago

@KamilSucharski This issue has been fixed and will be in the next release (7.6.2+).