B
B
Boogie19892016-06-30 04:47:34
YouTube
Boogie1989, 2016-06-30 04:47:34

How to display a large number of YouTube videos on the page?

Faced such a problem. My page should display a list of YouTube videos. But I use iframe or simple angular plugins, the page hangs until all the videos are loaded. If there are 2-3 videos on page, then you can tolerate it, if more, everything is bad. How to do it all right? Maybe there are plugins that display only the screen and load a specific video on click?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Alekseev, 2016-06-30
@shure348

YouTube videos have pictures-frames ..
I display them, and when I click, I replace them with a script for an iframe or display them in the bootstrap modal
here is an example of the path to one frame from the video img.youtube.com/vi {id_video} /0.jpg

A
Alexander Litvinenko, 2016-06-30
@edli007

As an option, request a list from the YouTube API and do not start the video itself until they click play,

B
Boogie1989, 2016-07-01
@Boogie1989

In short, it turned out something like this https://github.com/Boogie1989/youtube-video-directive

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question