Chosen Solution
It doesn’t work and it happened at the same time. What’s wrong with it?
Did it stop working all of a sudden, after being dropped, or after a software update? Both the front facing camera and the earpiece speaker contacts are on the same cable. It could have been disconnected from the logic board or has gone bad if software is not the underlying issue. If reseating the cable back onto the logic board doesn’t resolve the problem, try getting the front-facing camera & sensor cable replaced. If the cable resolves the camera issue but not the speaker, get a replacement earpiece speaker. Both parts are inexpensive. Approx. $10-15 each. Good Luck!
Has the phone has been ever opened for repair? Have you tried to reset the phone?