# Composer 预览侧边显示上传视频下方的控制按钮

**URL:** <https://meta.discourse.org/t/composer-preview-side-shows-the-control-buttons-under-the-uploaded-videos/321142>\
**Category:** UX\
**Tags:** composer, video\
**Created:** [2024 年8 月 11 日 21:20 UTC](https://meta.discourse.org/t/composer-preview-side-shows-the-control-buttons-under-the-uploaded-videos/321142 "2024-08-11T21:20:02Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2024 年8 月 13 日 19:15 UTC](https://meta.discourse.org/t/composer-preview-side-shows-the-control-buttons-under-the-uploaded-videos/321142/8 "2024-08-13T19:15:14Z")

</div>

我有一个准备好的 PR，很快就会修复这个问题：

> <https://github.com/discourse/discourse/pull/28349>
>
> When adding a video/image/audio to a post, we check the token content for dimens…ions. If dimensions are found, we assume the content can be resized and give it image controls in the composer preview. 
> 
> The problem is that we check the entire token, including filename, for dimensions. This means if a video has dimensions in its filename, we show broken controls: 
> 
> !\[image\](https://github.com/user-attachments/assets/93f3bbc9-1c0f-4ac3-b541-aab854624824)
> 
> 
> This PR updates the \`hasMetadata\` function so it checks the area dedicated to dimensions specifically, which comes after the \`|\` in markdown. 
> 
> Now images get the controls, and videos with dimensions in their filename do not: 
> 
> !\[image\](https://github.com/user-attachments/assets/92d64c52-f4d5-4ecc-9567-c0737f724ae7)

---

_[View the full topic](https://meta.discourse.org/t/composer-preview-side-shows-the-control-buttons-under-the-uploaded-videos/321142)._
