Pause video when user switches browser's tab
You might be curious how to pause video.js player when user switches browser's TAB and resume playback when user's back to your website page. This is what you can find on most of our website demo and examples page.
Let's assume that you already initialized your video.js player using "player" variable. The code below will pause video when user leave your website page by clicking other TAB in browser. When user's back, video will resume to play video if it was playing before.