An inquest has been shown confronting footage of police restraining an Indigenous man who died after being tasered outside an Officeworks store in Perth.

Family members cried in distress and left the room as the Perth Coroner’s Court was on Tuesday shown the confrontation between police and 39-year-old Mr Riley, whose first name is not being used for cultural reasons.

Counsel assisting the coroner Rachel Collins said police had attended the Officeworks store in East Perth in May 2017 in response to reports of a robbery involving two female suspects.

Mr Riley had a history of drug-induced psychosis and his family had been concerned about his welfare in the days leading to his death.

He had been apprehended by several other police officers the night before he died.

Ms Collins said a member of the public at Officeworks had alerted police to Mr Riley, who was seen rocking from side to side and slapping his forehead.

The two officers approached the father of six and when he did not engage with them, they called triple-zero and requested an ambulance.

Ms Collins said Mr Riley had then advanced on police and shouted “I’m going to kill you”, prompting Constable Rory Winterburn to discharge his Taser.

They attempted to restrain a prone Mr Riley as he struggled.

“During this resistance, Mr Riley made repeated and continuous attempts to take possession of Constable (James) Wolfe’s firearm and bit down hard on Constable Wolfe’s arm causing it to bleed heavily,” Ms Collins told the inquest.

An analysis showed Const Winterburn’s Taser was trigger-activated 10 times in less than two minutes just prior to and during the struggle.

A compilation of footage shot by witnesses on their mobile phones was played to a court room packed with members of Mr Riley’s family.

Some of his relatives became distressed and had to leave the room upon seeing the footage, which showed Mr Riley wailing as he was held down.

The footage shows officers arriving to assist with restraining Mr Riley, who was held down over a period of seven minutes before ambulance officers arrived.

He was initially found to be breathing but unresponsive. An ambulance officer was then unable to detect his pulse.

Attempts were made to resuscitate him at the scene before he was taken to Royal Perth Hospital, where he was pronounced dead.

A pathologist found the cause of death was consistent with cardiac arrhythmia “following violent exertion necessitating physical restraint in a man with methylamphetamine effect, known systemic hypertension and morbid obesity”.

Mr Riley had previously been convicted of assaulting a police officer and ambulance officer.

The inquest heard he had been stopped by police in the city’s east the night before his death after being seen driving erratically.

He was not placed under arrest but was put in handcuffs and taken to the Perth Watch House for a drug test.

Officers told Mr Riley he was free to go and gave him a lift to Royal Perth Hospital but he left before being seen by a doctor.

The following morning he was seen by cleaning staff outside the hospital yelling “cops are after me, why are they after me?”.

Mr Riley’s mother Margaret Ugle arrived at the Central Law Courts building holding a sign that read “I Can’t Breathe! BLM”, in reference to the death of African-American man George Floyd in police custody in the United States.

The inquest continues.