Initialize the media capture.

MediaCapture needs to be initialized before it can be used, otherwise it throws an exception.