added getUserMediaWithMaxId method