I suppose you've already tried this but...
With the headphone jack inserted in the phone and content playing, rotate the inserted headphone jack, lightly wiggle it, or otherwise slightly change the position of the jack within the phone's headphone jack. The idea is to see if you get any sound at all. If you do, it would indicate that there is something in the headphone jack interfering with a good connection.
When I had this problem, at first glance I thought I had cleaned out the headphone jack receptacle. But I kept at it and found some junk in there and cleaned it out.