The obvious things that playing games and watching videos have in common is higher power usage and more heat generation than most other activities.
Does it happen almost immediately or when you've been playing for a few minutes? If it's immediate we can eliminate heat as the problem, but increased power demand would still be possible.
It's impossible to reliably diagnose these things remotely, but my first thought is that this this could be a hardware fault. If it's software it has to be something that is done by a range of games and video apps but nothing else, which feels a little unlikely. Hardware explanations could range from a battery problem (the battery is unable to supply sufficient current to meet demand, causing a system crash) to a motherboard fault (which basically means a new phone).
Have you seen any other instabilities or glitches, and if so what was happening at the time? Any sign of degrading battery life? Anything that might give a clue, basically.
I'd advise backing up anything important anyway. You could see if a different ROM fixes it (if it's software that might). But if it is a hardware fault you'll need someone to look at it. If you feel up to changing the battery you could try that, but if it isn't a battery problem that would be a waste of time and money.