add video capture code and preview video layer