Abstracted the video javascript into a class (ChatWindow)