The shootout happens right in front of a security camera. The gunman can be seen firing then running away.
The officer ducks for cover, then as the gunman takes off he follows in pursuit.
"Radio, I'm shot, I'm shot," the officer can be heard saying.
The officer was later treated for his injuries at Temple University Hospital. The Action Cam was there on Wednesday as he was released while being saluted by his fellow officers.
The chaos started around 10 p.m. Tuesday along 400 block on Harlan Street in Kensington.
Investigators say that's where a police officer was talking to a robbery victim when the officer spotted a person matching the suspect's description.
The officer tried to stop that suspect and then there was a chase. Commissioner Danielle Outlaw says the suspect shot the officer twice in the shoulder.
Another security camera captured the gunshots and officers running for cover.
The suspect then ran onto a property along 1400 block of Lawrence Street. The homeowner flagged down responding officers and that's when police say the suspect shot the homeowner in the thigh.
As officers closed in, investigators say the suspect shot himself in the head in the area of North Leithgow Street.
Two officers transporting the suspect to the hospital were injured when they crashed into a car near 10th and Oxford streets.
Everyone involved was taken to Temple University Hospital for treatment.
"You get scared, you know. My wife is paranoid," said resident Jay Rodriguez.
"It is getting terrible. It is getting awful. I am scared for my kids and my husband. It's scary," said resident Terry Torres.
Commissioner Outlaw was visibly angry about yet more gun violence.
"I am beyond disgust at this point. These are offices in full uniform. These are fully marked vehicles. There is no question as to whether or not we are someone coming to hurt or harm. We were obviously responding to assist," she said.
"I have visited far too many trauma bays, ERs here in the city because we are visiting officers that have been shot or because I am meeting with family members who had loved ones that are shot," she continued.