Answer:
The velocity of a wave travelling in a medium changes when the medium of the wave changes
Factors affect the velocity would be the refractive index of the medium
Higher the refractive index denser will be the medium and lower will be the velocity.
And vice-versa that is lower the refractive index rarer will be the medium and higher will be the velocity.