示例#1
0
        private void OnVideoStart()
        {
            if (vimeoPlayer.GetWidth() > vimeoPlayer.GetHeight())
            {
                targetHeight = ((float)vimeoPlayer.GetHeight() / vimeoPlayer.GetWidth()) * transform.localScale.x;
            }
            else
            {
                targetHeight = ((float)vimeoPlayer.GetWidth() / vimeoPlayer.GetHeight()) * transform.localScale.x;
            }

            isLoaded = true;
        }
        private void OnVideoStart()
        {
            if (vimeoPlayer.GetWidth() > vimeoPlayer.GetHeight())
            {
                aspectRatio = (float)vimeoPlayer.GetHeight() / vimeoPlayer.GetWidth();
            }
            else
            {
                aspectRatio = (float)vimeoPlayer.GetWidth() / vimeoPlayer.GetHeight();
            }

            targetHeight = aspectRatio * vimeoPlayer.videoScreen.transform.localScale.x;

            isLoaded = true;
        }
示例#3
0
        private void OnVideoStart()
        {
            float ratio = (float)player.GetHeight() / player.GetWidth();

            targetHeight = ratio * targetWidth;
            isPlaying    = true;
        }