Hi
This one sounds like a dodgy connection
If you dismantle the headphones and look around for any dodgy or suspicious connections ,try reseating them if they have a connector,if not try reflowing them with a soldering iron and if you see a worn cable try putting some flux on it and flowing some fresh solder into it to help restore the connection
If the damage looks bad or if any bare metal will touch each other I would recommend replacing the part
If you need any help please let me know
Hopefully this helps
Any questions please ask
Thanks:-)