keeps video in play and replaces localhost with pi ip and makes value of recording a function of power