As you can see, in the Start() method, we register a method named PlayVideoWhenPrepared with the videoPlayer.prepareCompleted event, before invoking the Prepare() method of the videoPlayer component:
videoPlayer.prepareCompleted += PlayVideoWhenPrepared;
videoPlayer.Prepare();
The PlayVideoWhenPrepared(...) method has to accept a parameter as a reference to a VideoPlayer object. A UI GameObject was added to the scene displaying a RawImage texture.
We directly assigned the VideoPlayer object's texture property to the UI GameObject's RawImage's texture. Then, we sent the Play() message.
You can track the progress of clip preparation and so on through the Log messages in the Console window.