Don't believe everything you see in natural history films. That sequence was actually cut together from several shots. There are actually two different species of mantis shrimp shown and neither species occurs near Sydney where the octopus was from. I know and have worked with the person who filmed the sequence. He was trying to show behavior that has been reported previously - venom release by blue-rings to subdue prey (or potential predators at a distance, but I and others I know who work on blue-rings have been unable to elicit this behavior. It may occur, but I have not seen it. More like what happened is that the octopus what struck several times by mantis shrimp, was damaged by the blows and leaked some TTX, and in the confines of the tank in which the sequence was being photographed, the stomatopod was killed.
Roy