edit js for video playback