Indiana law enforcement agencies will get the right to withhold all body and dash cam video recordings from the public under a bill that's now headed to the governor's desk.

The state Senate voted unanimously Thursday in favor of the bill, which allows a person to challenge an agency's decision in court. The agency would then have to prove within 30 days that releasing the video would harm someone or hinder an investigation.

Law enforcement agencies say burdensome regulations would deter body cam use, but open-records advocates have pushed for greater police transparency. Bill sponsor Sen. Rodric Bray, R-Martinsville, said both sides have signed off on the final language as a compromise of their concerns.