Fix video bubbles not rendering and wire up the in-viewer player #8

Merged
alex merged 1 commit from video-render-fix into main 2026-05-19 08:56:43 -04:00
Owner

The bubble Column was wrapped in IntrinsicWidth so the reply preview
could match the bubble's natural width. That made every descendant
have to answer intrinsic-size queries. The video subtree's
LayoutBuilder cannot, so the bubble silently collapsed to zero and
only the delivery checkmark showed. Drop the LayoutBuilder; size the
bubble directly to naturalWidth/naturalHeight (the existing
maxDimension math already caps at 300 px).

Also guard the dimension math against info.w / info.h being 0 (some
senders ship those) which used to divide by zero and render a
NaN-sized SizedBox that stretched to the parent bubble.

Tapping a video opened the ImageViewer which used MxcImage for every
event type, including videos. MxcImage cannot decode video bytes, so
playback never worked. Wire the existing image_viewer/video_player.dart
(Chewie-based) into the viewer for MessageTypes.Video.

The bubble Column was wrapped in IntrinsicWidth so the reply preview could match the bubble's natural width. That made every descendant have to answer intrinsic-size queries. The video subtree's LayoutBuilder cannot, so the bubble silently collapsed to zero and only the delivery checkmark showed. Drop the LayoutBuilder; size the bubble directly to naturalWidth/naturalHeight (the existing maxDimension math already caps at 300 px). Also guard the dimension math against info.w / info.h being 0 (some senders ship those) which used to divide by zero and render a NaN-sized SizedBox that stretched to the parent bubble. Tapping a video opened the ImageViewer which used MxcImage for every event type, including videos. MxcImage cannot decode video bytes, so playback never worked. Wire the existing image_viewer/video_player.dart (Chewie-based) into the viewer for MessageTypes.Video.
Fix video bubbles not rendering and wire up the in-viewer player
Some checks failed
Pull Request Workflow / code_tests (pull_request) Failing after 1m24s
Pull Request Workflow / build_debug_apk (pull_request) Has been skipped
Pull Request Workflow / build_debug_web (pull_request) Has been skipped
Pull Request Workflow / build_debug_linux (pull_request) Has been skipped
939a3d253b
The bubble Column was wrapped in IntrinsicWidth so the reply preview
could match the bubble's natural width. That made every descendant
have to answer intrinsic-size queries. The video subtree's
LayoutBuilder cannot, so the bubble silently collapsed to zero and
only the delivery checkmark showed. Drop the LayoutBuilder; size the
bubble directly to naturalWidth/naturalHeight (the existing
maxDimension math already caps at 300 px).

Also guard the dimension math against info.w / info.h being 0 (some
senders ship those) which used to divide by zero and render a
NaN-sized SizedBox that stretched to the parent bubble.

Tapping a video opened the ImageViewer which used MxcImage for every
event type, including videos. MxcImage cannot decode video bytes, so
playback never worked. Wire the existing image_viewer/video_player.dart
(Chewie-based) into the viewer for MessageTypes.Video.
alex merged commit 5b51b5b9ef into main 2026-05-19 08:56:43 -04:00
alex deleted branch video-render-fix 2026-05-19 08:56:43 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
alex/Mochi!8
No description provided.