File tree Expand file tree Collapse file tree
packages/video-player/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,16 +201,13 @@ export async function preparePosterSrc(
201201 } else {
202202 url . pathname = `${ url . pathname . replace ( / \/ $ / , '' ) } /${ THUMBNAIL_SUFFIX } ` ;
203203 }
204-
204+ // strip all transformation parameters
205+ url . searchParams . delete ( 'tr' ) ;
205206 posterSrcUrl = url . toString ( ) ;
206207
207208 if ( input . poster && ( input . poster . src || input . poster . transformation ) ) {
208- const baseVideoUrl = new URL ( videoSrcUrl ) ;
209- if ( baseVideoUrl . searchParams . get ( 'tr' ) !== null ) {
210- baseVideoUrl . searchParams . delete ( 'tr' ) ;
211- }
212209 posterSrcUrl = ikBuild ( {
213- src : input . poster . src ?? baseVideoUrl . toString ( ) + `/${ THUMBNAIL_SUFFIX } ` ,
210+ src : input . poster . src ?? url . toString ( ) + `/${ THUMBNAIL_SUFFIX } ` ,
214211 urlEndpoint : '' ,
215212 transformation : input . poster . transformation ! ,
216213 } ) ;
You can’t perform that action at this time.
0 commit comments