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

Override on click preview behavior

Open anjanvb opened this issue 4 years ago • 1 comments

First of all thank you for this terrific library. Works really well.

Currently, the video starts to play when clicked on the preview when light is enabled.

Would like to disable playing when preview is enabled in some cases, for example if being used in a list of videos as thumbnail with light (think of the list of video youtube shows on the right side). The onClickPreview (on the thumbnail) can then be used to load the video in a larger frame/div for example.

Is there a way to override the behavior of what happens when preview is clicked? Or is the recommended way would be to simply render the preview image itself rather than react-player? In which case is it possible to get the image URL (for example the image URL that is included in YouTube's oembed response - https://www.youtube.com/oembed?url={video-URL}&format=json)?

anjanvb avatar Aug 15 '21 03:08 anjanvb

if you set playing to false, the video will not start after you click on the thumbnail's play icon

Sterv avatar Jan 25 '22 05:01 Sterv