How to find out video resolution after prepareCompleted in videoplayer

Hi Everyone:

In the new 5.6 VideoPlayer, after the prepareCompleted event, how do I query the resolution of the video?

I am using video url instead of clip. Therefore, the clip is null when receiving the prepareCompleted event.

When receiving prepareCompleted, frame rate and frame count are available. I am surprised that the width and height are not available through similar interfaces.

I am hoping that by querying the width and height, I can allocate a RenderTexture that has the same size as the video. This RenderTexture will be used as the targetTexture of the video player.

I have one idea that I have not tried yet. Setting the renderMode to APIOnly and check the size of the VideoPlayer.texture. However, this seems to be an awful lot of work for information that must be already known inside the VideoPlayer.

Thanks in advance.

Cheers,

Hmmm…

It looks like that when receiving the PrepareCompleted event, the VideoPlayer.texture did get set to the size of the video.

I guess my question is answered. However, it is still my believe that explicit interfaces similar to frameRate and frameCount would be nicer.

Cheers,