refactoring loadVideo method.