Add in the ability to get thumbnails for VideoPress via media endpoint.#6631
Merged
Add in the ability to get thumbnails for VideoPress via media endpoint.#6631
Conversation
jeherve
requested changes
Mar 13, 2017
| // Switch to photon if needed. | ||
| $poster = str_replace( | ||
| 'https://videos.files.wordpress.com', | ||
| 'https://i0.wp.com/videos.files.wordpress.com', |
Member
There was a problem hiding this comment.
Should we use apply_filters( 'jetpack_photon_url, $poster )` here, so all Photon filters / domain sharding / etc can be applied if needed?
Contributor
Author
There was a problem hiding this comment.
Makes sense, I'll apply this change and test. I was really just trying to fix the fact that Calypso won't work without Photon URLs here. But it makes sense to use the internal methods for this.
| // Switch to photon if needed. | ||
| $poster = str_replace( | ||
| 'https://videos.files.wordpress.com', | ||
| 'https://i0.wp.com/videos.files.wordpress.com', |
Member
There was a problem hiding this comment.
Should we use the jetpack_photon_url filter here as well?
Contributor
Author
|
@jeherve I've made the requested changes and with a couple tiny gotchas, it seems to be working fine now. |
jeherve
approved these changes
Mar 13, 2017
jeherve
approved these changes
Mar 13, 2017
Member
jeherve
left a comment
There was a problem hiding this comment.
This looks good and works in my tests! LGTM!
dereksmart
pushed a commit
that referenced
this pull request
Mar 14, 2017
…t. (#6631) * Add in the ability to get thumbnails for VideoPress via media endpoint. * Switch to use photon filter.
Contributor
|
merged to 4.7 ebcd7c1 |
dereksmart
pushed a commit
that referenced
this pull request
Mar 14, 2017
dereksmart
pushed a commit
that referenced
this pull request
Mar 14, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When we pushed out VideoPress, it was missing poster thumbnails. This is needed to make Calypso work correctly with Jetpack sites.
This PR seeks to add thumbnails by adding the wpcom functions that the API tries to call, to add in the images.
Request: Can we get this in the next point release for Jetpack, to make sure we get Calypso working ASAP?
Testing
Simply check the media library in Calypso and make sure thumbnails are loading.
If checking the output for the media API for a Jetpack site, you should see the thumbnails reporting in there like this: