-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Context
I eagerly generate a video and an image for its poster. They are then used through their raw URL in the cloudinary player:
const cld = cloudinary.videoPlayer(
'https://res.cloudinary.com/demo/video/upload/w_260,h_200,c_crop,g_north/sample.mp4',
{
posterOptions: {
publicId:
'https://res.cloudinary.com/demo/video/upload/a_hflip,w_260,h_200,c_crop,g_north/sample.jpg',
},
}
)
Problem
Due to this line (https://github.com/cloudinary/cloudinary-video-player/blob/edge/src/plugins/cloudinary/models/image-source.js#L17), the end suffix of the image is removed. This results in the same image being regenerated lazily which defeats the point of having it done eagerly.
Also it means that the poster for the video will only appear after few seconds which leads to a poor user experience.
This problem occurs solely for images since the constructor of the video source only removes the suffix when the public_id is not a raw url (https://github.com/cloudinary/cloudinary-video-player/blob/edge/src/plugins/cloudinary/models/video-source/video-source.js#L29).
Is this something that could be fixed ?
Cheers,