Rotate camera if player is about to go out of its view?

c’mon anyone ?? its been 6 days now…