-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in the ability to get thumbnails for VideoPress via media endpoint. #6631
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Switch to photon if needed. | ||
$poster = str_replace( | ||
'https://videos.files.wordpress.com', | ||
'https://i0.wp.com/videos.files.wordpress.com', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use apply_filters( 'jetpack_photon_url
, $poster )` here, so all Photon filters / domain sharding / etc can be applied if needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the jetpack_photon_url
filter here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@jeherve I've made the requested changes and with a couple tiny gotchas, it seems to be working fine now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and works in my tests! LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, works good!
…t. (#6631) * Add in the ability to get thumbnails for VideoPress via media endpoint. * Switch to use photon filter.
merged to 4.7 ebcd7c1 |
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: