Automattic / Automattic/jetpack

Media: Improve support for video blocks

Open
#30,642 1 comment 0 reactions 1 assignee Claimed by @kraftbj View on GitHub
[Feature] Publicize [Package] Publicize [Status] In Progress Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

While testing a post with primarily a video, there is no embedded video, no thumbnail, etc.

If you post some types of videos, the preview on Mastodon is nice:
https://mastodon.social/@KraftTesting/110351999349478465

If you post others, it isn’t:
https://mastodon.social/@KraftTesting/110350762986457391

Looking, our media summary class determines if the post “type” is standard vs video vs etc based on a few criteria… certain embeds or shortcodes
https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/_inc/lib/class.media-summary.php#L37

If you had a VideoPress video that was embedded using the old shortcodes, it would decide (with other markers, such as total number of paragraphs) that the post is a “video” post.
https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/_inc/lib/class.media-summary.php#L109
or
if it had a YouTube/Vimeo, etc post embedded into the content, it would decide that the post is a “video” post
https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/_inc/lib/class.media-summary.php#L179

If you’re using VideoPress in the modern way (or any block that inserts video outside of the Youtube, etc embed blocks which is what happens there), we don’t have any handling to mark the post as a “video” post.

In support of #7790

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.