Well unless the landing gear retracted uncommanded then it was the pilot who pulled the handle too soon. On some aircraft that have low gear retraction speeds it is one pilot practice to select gear up before starting the take off run. The safety squat switches keep the gear retraction sequence from starting until the weight comes off the wheels, as long as the switches work right and you don't settle back onto the runway after the initial "lightening on the wheels". It looks like that may have been what happened here. Bad practice for the reasons the video shows.