This has been discussed a few times, so a search should turn up past discussions.
Basically you need to run a wire from your
battery to a fuse or circuit breaker, then to a relay, then to a terminal on a 7 pin connector on the TV.
From the trailer
battery you need a run a wire to a circuit breaker or fuse to the 7 pin trailer connector.
You need to run at least 10 gauge wire including the ground.