M
M
Maxim Ramenskiy2015-08-20 13:38:20
YouTube
Maxim Ramenskiy, 2015-08-20 13:38:20

How to implement slider with iframe youtube?

Hello.

There is a slider of several videos. If you insert the iframe code into the slider, then the page starts loading all the videos when loading, which is not good.

How can I make it so that instead of an iframe, an image with a video preview is loaded, and the video itself is loaded only when the preview is clicked?
How do you make a video slider?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Pletenev, 2015-08-28
@Andrey_Pletenev

I don’t know how and on what you make the slider, but in theory you can just save one frame from each video as a picture, load these pictures in the slider. Make each picture a link to a video.

S
Sergey Eremin, 2015-09-02
@Sergei_Erjemin

use a div instead of an iframe... However, you can do whatever you want with iframe through styles. But it won't end there. You also need to suppress logos, control tools, mute the sound when the cursor is out of the video, stop the video when it leaves the field of view .... so learn the API https://www.youtube.com/yt/dev/ru/api-resources .html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question