Moves panning handler into video-js ready function