The 24-year-old was sentenced straight-away — without a trial, just a direct ruling by the judge. He did not have a lawyer.

An Alachua County circuit judge sent a man to jail for five months and 29 days for using Facebook Live in his courtroom without permission.

Jonathan Clyde Davis, 24, of Gainesville, was sentenced straight-away — without a trial, just a direct ruling by the judge — after he was questioned in the courtroom in the middle of an attempted murder trial and was found in contempt.

Judge William E. Davis issued a direct finding of contempt. Based on his written order this is what happened:

During the attempted murder trial of Frederick E. Littles Jr. on Thursday, Jonathan Davis — whose first name is sometimes spelled "Johnathan" — was seen recording with his cellphone from the gallery.

Deputies confronted the man and he turned over his cellphone. Officials found that he was not only recording the trial but also streaming it live on Facebook.

Posted on the "Hittmann Souljah" Facebook page, the videos are shaky and the audio poor, but one can hear witnesses testifying. In one, Davis stands outside the courthouse, boasting that Littles will be home soon.

The last of Jonathan C. Davis's four videos from the courthouse

The recording "disrupted the trial and required the Court to stop the trial to address his actions," the order states.

According to the document, an administrative ruling "prohibits recording and broadcasting of court proceedings without the prior approval of the presiding judge." The man did not have permission.

The judge gave him "an opportunity to explain his behavior," according to the order, and he denied making a video but only an audio recording. He told the judge he makes music and planned to use the recordings for that.

"He had no explanation for why he was livestreaming the trial on Facebook Live," Judge Davis stated in his order.

Littles, the defendant on trial last week, was found guilty Friday of second-degree attempted murder in an October 2015 case in which he argued with a man, then fired five shots at him as the man tried to run.

Underneath one of the Facebook videos, Davis posted "BOY YOU BE BOOMIN HOME BELIEVE DAT...." and added the hashtag #RIGHTPLANWRONGMAN.

State Attorney Bill Cervone said the trial had been plagued by witnesses reluctant to testify, and that the case involved "a lot of people who might be prone to that kind of witness intimidation."

"The judge was probably attuned to the possibility of that," he said.

The judge did not return The Sun's call.

The sentence was the maximum the judge could impose without Jonathan Davis being allowed legal counsel, Cervone said.

Davis has been imprisoned before: In February 2015, he was sentenced to one year and six months for possession of MDMA, and in 2009, he was sentenced to a year and seven days for felony battery, burglary and false imprisonment, state Department of Corrections records show.

UF law professor Kenneth Nunn, assistant director of the Criminal Justice Center and a former public defender in San Francisco and Washington, D.C., said contempt cases — especially ones with such a substantive penalty as a six-month jail term — are rare.

After briefly researching Florida law, Nunn said he believes one could argue that because the judge did not see the video being made, but was told of its existence by court bailiffs, that the defendant would have been more appropriately held in "indirect" contempt, which would mean another judge would need to hear the case.

In a 2012 ruling, a Florida appeals court overturned a conviction and six-month sentence given a man who was overheard by bailiffs cursing about the court system. Because the judge didn't clearly hear the comment, the appeals court ruled that direct contempt had not been proven.