How to include a thumbnail on AdvancedVideo component [React SDK]
Hello, I've been searching around on how to retrieve a thumbnail from a video uploaded to Cloudinary and how to include it on my AdvancedVideo component like modifying the URL to get the .JPG to use as a poster but it doesn't work. I can't seem to find any examples on how to achieve it.
const myVideo = cld.video("samples/" + idVideo);
const poster = myVideo.resize(thumbnail().width(100).height(100));
The URL looks like this:
cloudName/video/upload/c_thumb,h_100,w_100/v1/samples/idVideo
cloudName/video/upload/c_thumb,h_100,w_100/v1/samples/idVideo
0
-
Hi Bradley,
Thanks for reaching out and sorry for the delay in our answer as we discovered an issue preventing us to be alerted.
You actually need to use a CloudinaryImage element with the public_id of the video and the format appended to it as documented here: https://cloudinary.com/documentation/video_effects_and_enhancements#video_thumbnails.
Hope that helps.
Best,
Loic
0
Post is closed for comments.
Comments
1 comment