fix the bug with camera in chrome and mozilla