how to make video only when tab is active

Mutikasa

Power Member
Joined
May 23, 2011
Messages
589
Reaction score
216
Hi,
I want to make this: video on website which plays only when the tab is active and counter which checks the mouse movements and if 30 sec there's no mouse movement the video stops.
Basically, I want to force users to watch this video.
tnx
 
Use jQuery - track mouse movement and then remove the video from the DOM if it 's not moving.
 
Yes, this would be pretty easy to do with Jquery or plain Javascript.
 
Back
Top