It can cast a file from phone to the desktop or vice versa or to an android TV.
You can run the receiver on the raspberry pi and then cast to it from your android. I have not been able to find any android sender other than grayjay which can stream videos from YouTube and other platforms.