getCamera not working over internet

does anyone know why getCamera would work perfectly locally but not if i upload it and open it through a browser?