Why won't my iPhone 4S play sound out loud?

I recently bought a IPhone 4S, the sound work fine when It came but now it only plays through the ear phones or the ear peace, there's not type of ring tone or taping noise when using the keypad, same when playing music or videos, I've looked at the obvious settings there all how they should be, I've also tried to reboot still nothing, have I been Coned

Added (1). Yes I have checked the switch at the side, it shows on the screen the mute and un mute sign so presume its not that, it seemed to go wrong after linking it to the laptop, not sure if I clicked on something I shouldn't have

Did you check and make sure the rocker switch on the top left side isn't on mute? If not since you've just bought it, I would call apple or even bring it to a store nearby. They should replace it if there's any problem they can't fix.

Hope this helped

Before doing a hardware repair, try the DFU restore first. If this won't work, try replacing the dock connector. Why replace them? The dock connector component contains wirings and components that delegate sound throughout the phone.

My iPhone 4s won't play sound out loud, but I've noticed it's really only on Safari it will play music out loud but not YouTube or anything else on safari does anyone have any advice on what I should do or what happened