SACRAMENTO, Calif. — Taking a video recording of a violent felony as it is occurring may now increase a person’s criminal sentence in California.

Legislation signed by Gov. Jerry Brown on Wednesday says courts may consider such recordings as an aggravating factor when determining someone’s sentence. It applies to violent felonies such as murder, rape, robbery or a host of other crimes if the defendant is filming the offense with the intent of encouraging or facilitating it.

Assemblyman Matt Dababneh says the bill is aimed at deterring attacks motivated by social media.

It’s called “Jordan’s Law” after 14-year-old Jordan Peisner, who was attacked outside of a restaurant last year. A video of the attack was posted on social media.

A number of crimes have been streamed on social media in recent years.