SAN JOSE (CBS SF/AP) — In the wake of a workplace mass shooting that claimed the lives of nine transit workers, San Jose officials have passed a new gun law that requires retailers to video-record all firearm purchases, becoming the largest city in California with such a rule.

The city council unanimously approved the new law Tuesday, less than a month after a disgruntled employee fatally shot nine of his co-workers and then himself at a Valley Transit Authority rail yard in San Jose.

READ MORE: Dixie Fire Grows To 192,849 Acres; 21% Contained

Click For Complete Coverage Of VTA Mass Shooting

The new ordinance is aimed at deterring an illegal practice known as straw purchasing, in which someone buys a gun for another person such as a felon or minor who is prohibited from owning firearms, the Mercury News reported.

Most retail stores in San Jose already have some sort of surveillance system. The new law requires them to take an extra step to capture audio and to retain the videos for at least 30 days, giving law enforcement the opportunity to collect evidence they might need to solve some gun crimes, said City Attorney Nora Frimann.

The new law is part of a 10-point gun control plan that Liccardo unveiled last week following the rail yard shooting by a disgruntled Santa Clara Valley Transportation Authority employee who killed himself.

READ MORE: CHP Seeks Suspects in Deadly Saturday Freeway Shooting in Concord

“We know a significant number of crooks and gangs get firearms through straw purchasing,” Mayor Sam Liccardo said. “This set of ordinances is really focused on narrowing the flow of guns to those which are clearly legal and hopefully doing something to deter the flow of guns that are unlawful to own.”

The mayor’s plan also calls for a separate ordinance that would require gun owners to carry liability insurance and pay a fee to cover taxpayer costs associated with firearm violence. The council is expected to consider that proposal this fall.

San Jose joined Chicago and several smaller California cities — including Campbell, El Cerrito and San Carlos — in requiring the videotaping of gun sales, according to the Giffords Law Center. Walmart, the nation’s largest gun seller, started voluntarily videotaping gun sales in 2008.

Gun-rights advocates, like the Sacramento-based Firearms Policy Coalition, criticized the new ordinance, calling it unconstitutional.

MORE NEWS: Family of Delivery Man Slain in Walnut Creek Demands More Arrests for Suspect's Friends

“It is outrageous that Mayor Liccardo wants to use ‘Big Brother’-style omniveillance to record gun owners’ every move, violating the privacy of millions, especially at-risk firearm purchasers,” the coalition wrote in a statement.