Skip to content

[AND-462] (compose): Replace VideoView with ExoPlayer + PlayerView. #5749

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Apr 25, 2025

🎯 Goal

Introduces media3.exoplayer to the compose SDK to improve playing of video (and audio) attachments.

🛠 Implementation details

  • Adds androidx.media3:media3-exoplayer and androidx.media3:media3-ui dependencies. (There is also a compose artefact (media3-ui-compose), however it is in very early development, and doesn't provide all the options like the media3-ui does (fast forward/backward, speed controls, progress indicator...))
  • Rework the MediaGalleryVideoPage to use PlayerView + ExoPlayer (instead of VideoView)
  • Rework the MediaAttachmentActivity to user PlayerView + ExoPlayer (instead of VideoView)

🎨 UI Changes

Add relevant screenshots

Scenario Before After
Video (MediaGalleryVideoPage)
before.mp4
after.mp4
Audio (MediaPreviewActivity)
before-audio.mp4
after-audio.mp4

🧪 Testing

  1. Open compose sample app
  2. Open channel with Video attachments
  3. Play the video attachment (the performance should be much better than previously)

Copy link
Contributor

github-actions bot commented Apr 25, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.16 MB 3.16 MB 0.00 MB 🟢
stream-chat-android-offline 3.38 MB 3.38 MB 0.00 MB 🟢
stream-chat-android-ui-components 7.89 MB 7.89 MB 0.00 MB 🟢
stream-chat-android-compose 9.94 MB 12.38 MB 2.44 MB 🔴

@VelikovPetar VelikovPetar changed the base branch from jcdevelop to develop April 28, 2025 08:16
@VelikovPetar VelikovPetar marked this pull request as ready for review April 28, 2025 08:33
@VelikovPetar VelikovPetar requested a review from a team as a code owner April 28, 2025 08:33
@VelikovPetar VelikovPetar marked this pull request as draft April 28, 2025 13:59
@VelikovPetar VelikovPetar marked this pull request as ready for review April 29, 2025 07:20
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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

Successfully merging this pull request may close these issues.

1 participant