use enumeration for key/values of states, fix video reloading