Pausing video when Tab / Page is not active

Added code for Pausing video when Tab / Page is not active and Play
otherwise (with a delay).