add preview layer and toggle camera

add preview layer and toggle camera.