wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.95k stars 1.31k forks source link

Video thumbnails missing in posts list and preview for video shortcodes such as `[wpvideo]` #5370

Open hoverduck opened 7 years ago

hoverduck commented 7 years ago

Expected behavior

To see a video thumbnail in the Posts list or post preview

Actual behavior

The shortcode is shown instead

Steps to reproduce the behavior

1) Create a new post with a wpvideo shortcode and publish it 2) Look at the card on the Posts page

It would be nice to see a thumbnail of the video, but instead all I see is the shortcode like [wpvideo] (note that it's not even the full shortcode, it's missing the video code itself).

image

Tested on Nexus 6P, Android 7.1.2, wp alpha-38
hoverduck commented 7 years ago

Also note that there are likely other shortcodes/embeds that could benefit from some other representation here as well.

daniloercoli commented 7 years ago

The Post list shows the [video] tag when the post is finished uploading in Aztec as of #6358, or the [wpvideo] tag in the Visual Editor.

Details:

The standard WordPress [video] shortcode

VideoPress [wpvideo] shortcode

@nbradbury Would you mind to take the lead on this?

daniloercoli commented 7 years ago

As brought up by @mzorz in this other PR here https://github.com/wordpress-mobile/WordPress-Android/pull/6412#issuecomment-318375557 we should probably cache video thumbnails for remote videos. It's "kind" of OK-ish loading the previews by using the real video URL in the Editor, but probably in posts list we should use another approach, and create a cache somewhere that maps video urls --> video preview images.

nbradbury commented 7 years ago

Changed to low priority as per Slack discussion.

designsimply commented 4 years ago

Tested and confirmed that videos don't show in the Posts List for wpvideo shortcodes or for video blocks added using Gutenberg Mobile on a WordPress.com Premium site.

Screenshot_20191024-133747

Tested with WPAndroid 13.5-rc-1 using Pixel 3 Android 10 on a aboutmakingmovies.movie.blog WordPress.com Premium site.

Removing [Pri] Low as the video block becomes more and more used with more mentions from users starting to come in.