Fix video bubbles not rendering and wire up the in-viewer player #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "video-render-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.