some js refactoring, reanimate webcams