Switching from wifi to 5G and back

Is it possible to make video/music playback continue when you go off / on the wifi? I know this works on youtube