Usually you need a network of some kind in the house, then the phone and TV would both connect to that network. Some TVs then have an app in the Play Store you install on the phone to be able to control some functions of the TV. The problem is that often the TV will take over the actual stream and the phone becomes a remote for play/pause/skip for that stream, this requires an internet connection on the home network. Also, the phone will revert to using the WiFi for data once it's connected, and if the WiFi isn't connected to an internet connection you won't be able to access anything.