Exemplo n.º 1
0
 private void _OnPlaybackCompleted(MPMP mpmp)
 {
     Debug.Log("API Test::_OnPlaybackCompleted:" + mpmp.name);
     if (videoTransform != null)
     {
         Vector2 size = mpmp.GetNativeVideoSize();
         videoTransform.localScale = new Vector3(size.x, size.y, 1f) * 0.0011f;
         videoTransform.GetComponent <MPMPScaleFlip>().DoFlip();
     }
 }
Exemplo n.º 2
0
        private void _OnLoaded(MPMP mpmp)
        {
            Debug.Log("API Test::OnLoaded:" + mpmp.name);
            Vector2 size     = mpmp.GetNativeVideoSize();
            double  duration = mpmp.GetDuration();

            Debug.Log(String.Format("NativeVideoSize: w:{0}, h:{1}", size.x, size.y));
            Debug.Log(String.Format("Duration: {0} in seconds", duration));
            if (videoTransform != null)
            {
                videoTransform.localScale = new Vector3(size.x, size.y, 1f) * 0.002f;
                videoTransform.GetComponent <MPMPScaleFlip>().DoFlip();
            }
        }