ALBANY, N.Y. (AP) — Legislation introduced in New York state would make it a crime to upload or livestream video of a crime to social media with the intent of glorifying violence or seeking fame.

State Sen. Phil Boyle, a Long Island Republican, said Thursday that his bill is a response to a series of "heinous crimes" that have been filmed and posted online by the perpetrators.

Boyle says his proposal is needed to prevent "attention-hungry criminals" from using the internet to celebrate violence.

Those who violate the proposed law would face up to four years in prison as well as fines.

Bystanders who film a crime while it is occurring — or news organizations covering a story — would be exempted from the law.

More From WIBX 950