A Sydney teenager who assaulted a television cameraman outside a court has pleaded guilty to separate firearm and knife offences.

The 17-year-old charged at Channel 9 freelancer Mario Conti outside Burwood Court last week after an appearance by Kieran Loveridge who is charged with the murder 18-year-old Thomas Kelly at Kings Cross.

Conti hit his head on the footpath and required hospital treatment.

It has now emerged his teenage attacker, who cannot be named for legal reasons, was arrested in April after going through the drive-through of McDonald's at Merrylands armed with an air pistol.

A search of his car uncovered 10 retractable knives.

He has pleaded guilty to the charges and applied for bail, which was refused.

He will be sentenced at a later date.