Answer the question
In order to leave comments, you need to log in
How to make the video play automatically only when the place with the inserted video appears on the screen (when scaling)?
I have seen this on some sites. And the sound "increases" as the video appears.
Can this be done with audio only? Those. There is no video, but when you scroll to a certain place, does the audio start playing?
Answer the question
In order to leave comments, you need to log in
Google "lazyload js"
The bottom line is that you:
1) Calculate the distance from the desired element to the top edge of the site
2) Calculate the scroll position (distance from the top edge of the screen to the top edge of the site)
3) Depending on the first two values, you do what you need (turn on the player, start the video, load pictures, ...)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question