react-player icon indicating copy to clipboard operation
react-player copied to clipboard

Nextjs - Optimized Light video preview using Image component or something like that

Open santyas opened this issue 3 years ago • 2 comments

Current Behavior

Workin with Nextjs, light preview image is loading at the beginning of page load like a normal image but not caching or when it's on the viewport as expected using next/image.

Expected Behavior

Maybe add an Image component to boolean | string

Steps to Reproduce

Im not able to reproduce it sorry

https://nextjs.org/docs/basic-features/image-optimization

santyas avatar Mar 09 '22 14:03 santyas

Yeah I have the same issue, need to help with this.

VitalikMelnyk avatar May 24 '22 09:05 VitalikMelnyk

I'd love to have this feature as well. Maybe the ability to add a custom component to the light prop. Something like:

light={<Image src={video.thumbnail_url} />}

kb1995 avatar Sep 17 '22 21:09 kb1995

Looks like this might be possible, just not documented: https://github.com/cookpete/react-player/blob/master/src/Preview.js#L62

brianpmaher avatar Oct 13 '22 03:10 brianpmaher