Skip to content

fix(ui): replace get_thumbnail_video with the stream_thumbnail plugin - #2829

Merged
xsahil03x merged 1 commit into
masterfrom
chore/migrate-thumbnail-plugin
Jul 22, 2026
Merged

fix(ui): replace get_thumbnail_video with the stream_thumbnail plugin#2829
xsahil03x merged 1 commit into
masterfrom
chore/migrate-thumbnail-plugin

Conversation

@xsahil03x

@xsahil03x xsahil03x commented Jul 21, 2026

Copy link
Copy Markdown
Member

Submit a pull request

Linear: FLU-

Github Issue: #2360

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Replaces the get_thumbnail_video dependency with Stream's own stream_thumbnail plugin.

Why

get_thumbnail_video ships an iOS VideoThumbnailPlugin symbol that collides with video_thumbnail / video_editor, causing a duplicate-symbol crash when an app depends on both alongside this SDK (#2360). It also lacks Swift Package Manager support, which will become a hard build error on upcoming Flutter versions.

stream_thumbnail (maintained in stream-core-flutter) uses a uniquely-named StreamThumbnailPlugin and ships SPM support, resolving both.

What changed

  • Swapped get_thumbnail_videostream_thumbnail in melos.yaml and stream_chat_flutter/pubspec.yaml.
  • Updated video_service.dart / video_thumbnail_image.dart to use StreamThumbnail.thumbnailData(...) and StreamThumbnailFormat.

Non-breaking

The affected symbols (imageFormat, now typed StreamThumbnailFormat) live on src/video/ classes that are not exported by the public barrel — no public API changes.

Testing

flutter analyze is clean and thumbnail generation was verified end-to-end. The stream_thumbnail dep is pinned to a git ref until it is published to pub.dev; it must be swapped to a pub version (along with stream_core_flutter) before releasing.

Screenshots / Videos

N/A — no visual change.

Summary by CodeRabbit

  • Bug Fixes

    • Resolved an iOS crash related to duplicate video thumbnail plugin symbols.
    • Improved video thumbnail generation compatibility when other video packages are also included.
  • Updates

    • Switched thumbnail generation to Stream’s thumbnail implementation.
    • Updated thumbnail format handling to use StreamThumbnailFormat (default remains PNG).

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e5863e1-b4ba-4588-8f88-caa194d86022

📥 Commits

Reviewing files that changed from the base of the PR and between 0918733 and 949c70b.

📒 Files selected for processing (5)
  • melos.yaml
  • packages/stream_chat_flutter/CHANGELOG.md
  • packages/stream_chat_flutter/lib/src/video/video_service.dart
  • packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart
  • packages/stream_chat_flutter/pubspec.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart
  • packages/stream_chat_flutter/CHANGELOG.md
  • packages/stream_chat_flutter/lib/src/video/video_service.dart
  • melos.yaml

📝 Walkthrough

Walkthrough

The PR replaces get_thumbnail_video with stream_thumbnail, updates thumbnail format types and defaults, and routes non-desktop thumbnail generation through StreamThumbnail.thumbnailData.

Changes

Thumbnail dependency migration

Layer / File(s) Summary
Replace thumbnail dependency
melos.yaml, packages/stream_chat_flutter/pubspec.yaml, packages/stream_chat_flutter/CHANGELOG.md
Dependency declarations replace get_thumbnail_video with stream_thumbnail version ^0.1.0, and the changelog records the replacement.
Update thumbnail generation contracts
packages/stream_chat_flutter/lib/src/video/video_service.dart, packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart
Thumbnail format parameters and properties use StreamThumbnailFormat, while non-desktop generation calls StreamThumbnail.thumbnailData.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: renefloor

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: replacing get_thumbnail_video with stream_thumbnail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/migrate-thumbnail-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/stream_chat_flutter/lib/src/video/video_service.dart`:
- Line 37: Use the explicit StreamThumbnailFormat.png default in the video
service declaration at
packages/stream_chat_flutter/lib/src/video/video_service.dart:37 and the
corresponding default at
packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart:49,
replacing the shorthand .png in both sites.

In `@packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart`:
- Line 64: Update the video thumbnail image provider’s operator == and hashCode
to include imageFormat and every other thumbnail-generation parameter, including
frame, size, and quality, alongside video and scale. Ensure identical option
sets remain equal while any differing generation option produces a distinct
cache key.

In `@packages/stream_chat_flutter/pubspec.yaml`:
- Around line 73-84: Remove all stale get_thumbnail_video.framework references
from the iOS Runner Xcode project, including file references, build-phase
entries, and linked-framework settings, while preserving the stream_thumbnail
dependency configuration and other framework links.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a0ecedcb-df72-421d-9b19-54393ad55c10

📥 Commits

Reviewing files that changed from the base of the PR and between 4dee989 and 0918733.

📒 Files selected for processing (5)
  • melos.yaml
  • packages/stream_chat_flutter/CHANGELOG.md
  • packages/stream_chat_flutter/lib/src/video/video_service.dart
  • packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart
  • packages/stream_chat_flutter/pubspec.yaml

Comment thread packages/stream_chat_flutter/lib/src/video/video_service.dart
Comment on lines +73 to +84
stream_thumbnail:
# Stream-maintained thumbnail plugin. Pinned to a git ref until it is
# published to pub.dev.
#
# **Note:** Before publishing stream_chat_flutter, this MUST be swapped
# back to a pub version constraint — git deps are not allowed on pub.dev
# and will block the release.
# ignore: invalid_dependency
git:
url: https://github.com/GetStream/stream-core-flutter.git
ref: ef5b25a851c132b299e08a3ad9d73ef7f2d16dfd
path: packages/stream_thumbnail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Remove leftover framework reference in the iOS project.

The get_thumbnail_video dependency was removed from the pubspec, but sample_app/ios/Runner.xcodeproj/project.pbxproj still links get_thumbnail_video.framework. This may cause build failures or fail to resolve the duplicate-symbol crash on iOS. Please update the Xcode project (or run pod install if applicable) to remove the stale framework reference.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/stream_chat_flutter/pubspec.yaml` around lines 73 - 84, Remove all
stale get_thumbnail_video.framework references from the iOS Runner Xcode
project, including file references, build-phase entries, and linked-framework
settings, while preserving the stream_thumbnail dependency configuration and
other framework links.

Source: Linked repositories

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.35%. Comparing base (4dee989) to head (949c70b).

Files with missing lines Patch % Lines
...ream_chat_flutter/lib/src/video/video_service.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2829   +/-   ##
=======================================
  Coverage   71.35%   71.35%           
=======================================
  Files         430      430           
  Lines       26945    26945           
=======================================
  Hits        19226    19226           
  Misses       7719     7719           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Swaps the `get_thumbnail_video` dependency for Stream's own `stream_thumbnail`
plugin (uniquely-named `StreamThumbnailPlugin`), which resolves the iOS
duplicate-symbol crash when an app also depends on `video_thumbnail` /
`video_editor` (#2360).

Internal-only change: the affected `imageFormat` (now `StreamThumbnailFormat`)
is on non-exported `src/video` symbols, so the public API is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xsahil03x
xsahil03x force-pushed the chore/migrate-thumbnail-plugin branch from 0918733 to 949c70b Compare July 21, 2026 14:47
@xsahil03x
xsahil03x merged commit 13beea6 into master Jul 22, 2026
27 of 28 checks passed
@xsahil03x
xsahil03x deleted the chore/migrate-thumbnail-plugin branch July 22, 2026 08:20
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.

2 participants