The circuit is called wattless voltage dropper.
The orange capacitor is a like a resistor for AC.
As it is directly coupled to the mains, it is very dangerous.
I would not make the circuit.
Thanks for the info . Besides being live 220 ac would the same circuit then work for 110vac to 12vdc or to 5vdc? After reading a bit about it it seems that its a very inefficient power supply type
This kind of circuit is often used in cheap, sealed electronics. It shall by no means be used if there is any chamce of user access to the circuit (e.g. a connector ...)
This circuit works for any kind of AC input. It uses the impedance of the capacitor (XC = 1 / (2 × Pi × f × C) to limit the current. Due to the phase difference between voltage across and current through the capacitor the power dissipation is greatly reduced in comparison to a resistor.