Fixed some errors thrown in console after closing or pausing a video.
Error 1: occurred on video pause. Was caused by calling non-Vue functions directly in the template, which is not allowed (because fns in template are called from Vue context). Fixed by moving this to its own function (pauseHandler).
Error 2: occurred when the controls were open and user would go back. This is because the interval for updating the current playhead time was not cleared. I opted to simplify the time update code using computed properties, negating the need for an interval.
Error 3: occurred when going back while the video is still playing. This is because the event handlers were not properly removed from the player. A named function needs to be passed to the removeEventListener function. Resolved by breaking each event into its own method, then passing that method to the addEventListener and removeEventListener calls.
Fixed some errors thrown in console after closing or pausing a video.