Skip to content

WIP: #133 - Added video render mode option

Description

Issue number -> #133 (closed)

This plugin didn't have video render mode option. It's useful to select mode by users. I prepared three render mode

  • Fill // The fill mode. In this mode, the SDK stretches or zooms the video to fill the display window.
  • Hidden // Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
  • Fit // Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit).

Demo

I placed a half-height, full-width sizedbox in the center, and placed the Twilio view inside it. The following table is the results of render mode options. As you can see, only the android VideoScaleType.ASPECT_BALANCED does not work properly. I tried many things to solve that problem, but no solution was found. If anyone knows how to solve it, please advise me.

Mode iOS Android
Fill
Hidden
Fit

Checklist

Before you create this MR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting MRs.
  • My MR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The flutter analyzer (flutter analyze) does not report any problems on my MR.
  • The kotlin analyzer (ktlint) does not report any problems on my MR.
  • The swift analyzer (swiftlint) does not report any problems on my MR.
  • I read and followed the Flutter Style Guide.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy. And afterwards run flutter pub get, which will update the pubspec.lock with the correct new version.
  • I updated CHANGELOG.md to add a description of the change.
    • And when a Twilio SDK is upgraded I also mentioned this in the CHANGELOG.md
  • I am willing to follow-up on review comments in a timely manner.
  • I am done with this MR and removed the Draft status, by clicking on the Mark as ready button in this MR

Breaking Change

Does your MR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

Related Issues

#113 (closed)

Edited by Jochum van der Ploeg

Merge request reports