Honestly? Not a damned thing (with a caveat).
First, at no time was anyone's life in danger of death or grievous bodily injury. Yes, the guy was toting a gun, but if you'll notice, it didn't appear to be specifically aimed at anyone at any given time and, as has been pointed out before, the guy was passing it off between hands.
Second, (and this is an unknown, the video isn't all that great) the guy may have had a bulletproof vest on. He appeared to have, at the very least, some tactical gear.
Third, no one can guess the background from the video if you were, for example, the guy in front of the counter. There were two, maybe three voices. I don't know the set of the structure. . .what's behind the walls on the other side of the counter. . .is there another store there? A gym? A preschool? It looked like the store was in a strip-type mall. The back may have been wood and siding or it may have been concrete. I don't know.
Remember YOU answer for every bullet that leaves the barrel of your gun . . . and they can't be called back once the hammer (or striker) falls.
IF someone's life was in immediate danger, there is the option of dropping to a knee to try a headshot at an angle that would minimize the chance for a ricochet or overpenetration into a crowded area, but that's an absolute last resort. Despite those whose nerves are made of titanium and for whom an adrenal response is more akin to a sugar rush. . .and who also possess a match-grade sidearm, have lightning-fast draws and for whom putting a couple of bullets on a dangling ping-pong ball at 10' is child's play, those of us who are mere mortals understand that making a headshot on a moving target is difficult under any circumstances.
If anything, ANYTHING went wrong. . .a miss that ricocheted and injured someone, a miss that resulted in the robber pulling the trigger and his pellets or slug found someone. . .it is going to be YOU who is sitting before a jury of your peers taking responsibility for your actions.
So, from what I saw, there was nothing calling for the use of deadly force in that video. And I sure as hell ain't going to jail or stand a trial for, as NKTAWG put it, a robber robbing a robber.
I wouldn't have left, though. I would have to deal with my own conscience if I left and the guy killed the others when I had the ability and tools to stop it.
The Professor