implementation of pausing video