I have an issue with my brand new Nexus 5x. Ring sound, such as notifications or calls, or alarm sound works great. But there's no sound for media, such as games, Google play music, playing a video. However, if I plug an earset then I can hear any of these sounds.
Since speakers work great for notifications and alarm then it supposed to be the software issues.
I've also tried to boot in safe mode, hard reset, reset through recovery mode and all of it without success.