Skip to content

Commit

Permalink
adding video thumbnail for the .mp4 extension (#2052)
Browse files Browse the repository at this point in the history
  • Loading branch information
iFlameing authored Dec 11, 2020
1 parent 384bb3c commit 653439b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugfix

- Adding video thumbnail for the .mp4 extension @iFlameing.

### Internal

## 10.3.0 (2020-12-04)
Expand Down
9 changes: 9 additions & 0 deletions src/components/manage/Blocks/Video/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,15 @@ class Edit extends Component {
: data.url
}
controls
poster={
data.preview_image
? isInternalURL(data.preview_image)
? `${flattenToAppURL(
data.preview_image,
)}/@@images/image`
: data.preview_image
: ''
}
type="video/mp4"
/>
) : (
Expand Down
9 changes: 9 additions & 0 deletions src/components/manage/Blocks/Video/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ const View = ({ data }) => (
: data.url
}
controls
poster={
data.preview_image
? isInternalURL(data.preview_image)
? `${flattenToAppURL(
data.preview_image,
)}/@@images/image`
: data.preview_image
: ''
}
type="video/mp4"
/>
) : (
Expand Down

0 comments on commit 653439b

Please sign in to comment.