Both the speed and the direction of a wave could change
at the beginning and end of the medium, when the wave
crosses from one medium into a different one.
But while the wave is moving from one place to another place
in the same medium, its speed and direction don't change.