Can you solve the hat riddle?
From Veritasium · · 1 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.
If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.
Not rated yet
Description
You and 3 amigos are buried neck deep in sand in a prison yard.
The guard says if one of you can guess your own hat colour you can all go free. You know there are two black hats and two white hats and you can only see the hats of the people in front of you.
A minute passes in silence and then one of you shouts out a correct answer.
Who shouted?
A, B, C or D?