I tried this. The problem doesn't occur in safe mode, so the only logical conclusion is that it's happening because of some app that I have installed. But I really don't know what that app could be.
Sometimes, media on my phone will pause automatically. It happens to everything, from YouTube to SoundCloud to VLC media player. It will simply pause. I have no idea what's causing it.