Similar, a camera can also be sufficient to measure heart rate: https://www.youtube.com/watch?v=SA5QVm8M9PE
The method is actually quite interesting. By exaggerating slight changes in color you can actually visually see someone's pulse (and other small changes in the environment.)