YouTube prankster Mike Martin has lost custody of two of his five children after featuring them in a series of controversial videos that earned millions of views on his channel.

The children's biological mother has now obtained emergency custody of her children. In a video where she appears with her lawyer, Rose Hall said: "They're doing good. They're getting back to their playful selves." Tom Conlon, her lawyer, added that the children were "in a deprogramming sort of mode in the moment".

Martin launched his channel DaddyOFive in August 2015 but thanks to the popularity of videos showing him and his wife playing pranks on their kids – Cody, 12, and sister Emma, 9, – they racked up almost 800k subscribers.

One video showed the parents telling Cody he had been adopted by another family. Anther showed Cody being pushed and with a bloody nose. Martin claimed the blood was fake. Cody's computer was smashed and he was accused of spraying his room with ink when he didn't.

When they faced criticism of emotional and physical abuse from members of the online community, both claimed the videos were fake.

The offending videos have since been deleted from the video-sharing site with a DaddyOFive apology video posted on the 22 April 2017 remaining. It has amassed over two million views.

In the short clip the couple express their remorse, saying that they were unaware of the detrimental effect the videos would have on their children. "I understand and acknowledge and respect how everyone feel," Martin said in the three-minute video. "We put things on the internet that should not be there and did things we should not do."

Mike and Heather Martin
Mike and Heather Martin faced criticism for the videos Youtube/DaddyOFive

In the accompanying caption, they added: "What started out as family fun and entertainment took on a life of its own. Before we knew it, we were caught-up in our families [sic] popularity which led to some poor decisions.

"Upon reflection, we realize there were mistakes made that caused our family some pain; we offer our most humble and sincere apology to those we negatively impacted and offended, particularly our wonderful children. Our children are safe. Off camera and out of character, they are normal, happy kids who play sports and love being with their family and friends. Thank you for your understanding as we work through this difficult time."