A
A
Alibek Kulseitov2018-12-14 13:50:12
YouTube
Alibek Kulseitov, 2018-12-14 13:50:12

Youtube video preview on hover?

What is the right way and how to implement it?
The client saw this feature on YouTube and now wants it to be the same on the site. There is a list of news with preview pictures and how can I implement them on hover so that they look like a GIF? If I understand correctly, this is a gif. But when you switch to this news, the YouTube player with the video is already inside

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2018-12-14
@thewind

Are you familiar with the ommouseover, onmouseout events? What's so difficult...

R
Rikcon, 2018-12-14
@Rikcon

https://www.binpress.com/generate-video-previews-f...
What is it?

P
profesor08, 2018-12-14
@profesor08

If you need a gif, then generate a gif from a piece of video and insert it under the picture, hide the picture on hover, and the gif will become visible, instead of a gif, there can be a piece of video that is stored on the server. But making gifs or pieces for each video is somehow expensive.
Instead of a gif, you can insert an iframe with a video from youtube, hover over the picture and start playing the video (youtube iframe api). There is nothing complicated there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question