Answer the question
In order to leave comments, you need to log in
Wordpress: how to play and pause video on hover?
Actually, subject.
I want to do exactly as it is done by: https://www.alomoves.com
Answer the question
In order to leave comments, you need to log in
WP has nothing to do with it.
Write in js:
let video = document.querySelector('video');
video.addEventListener('mouseover', e=>{e.target.pause()});
video.addEventListener('mouseout', e=>{e.target.play()});
Who cares. I use nginx upstream, the weakest VPS (1CP/10 GB SSD/1 GB RAM) handles proxying. The bottleneck is the channel width (~50 Mbit/s), I had to expand it for money (well, disable the nginx logs because of the 10 GB zisk). Renting a server for proxying would be ~2 times more expensive, so the savings are small and it's better to rent a server. But nginx upstream itself works great!
Depending on the task:
haproxy, nginx, squid....
But you WILL NOT BE ABLE TO SHARED THE LOAD IN SEPARATE SERVERS if you just take VPS/VDS.
Since the input channel and the output channel are the same for them.
You will EVEN WORSE the situation - increase the load on the first server (proxy) in the chain. Since, in addition to incoming connections, it will also be forced to process outgoing connections to child servers. And there is only one channel ....
To do it normally, you need to take a group of servers along with an internal network service between them, so that one channel goes outside, and a completely different one inside. And these are not cheap rates.
I would just put one powerful server and optimize the software.
If your goals allow the task to be delayed and the load is not uniform, then the situation is simpler - and, indeed, you can get by with a lot of VPS / VDS.
If we are talking only about media files, then, for sure, cloud storage (such as S3, etc.) or your own iron (dedicated) server will be much better.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question