What does a streaming application do when I switch from mobile data to wifi?
Usually recent versions of Android Handles these network switching automatically. When you are connected to WIFI, Your content would be streamed via WIFI connection .You can confirm this The mobile network symbol - H/H+/E/4g would not be available in the status bar of the mobile.

Usually, Android manages WIFI and Mobile network automatically, I.e., when both WIFI and Mobile Internet is enabled and If WIFI is avaialble, Mobile internet is not used. When  u leave the WIFI network, you would get connected via Mobile data. Hope this helps :)