Exemplo n.º 1
0
 /**
  * 打开原生相机录制视频
  */
 private void IPhonePlayerMakeVideoOpenCamera()
 {
     NativeGallery.Permission rest = NativeGallery.RequestIPhonePermission(1);
     if (rest == NativeGallery.Permission.Granted)
     {
         NativeGallery.IPhoneCameraMakeVideoFromGallery(backPath =>
         {
             if (backPath.IsNotNullAndEmpty())
             {
                 mPath          = backPath;
                 mThumbnailPath = Application.temporaryCachePath + "/videoThumbnail.png";
                 AudioContent.gameObject.SetActive(false);
                 ImageDownloadUtils.Instance.SetAsyncImage("file://" + Application.temporaryCachePath + "/videoThumbnail.png", ImagePic);
                 BtnVideo.gameObject.SetActive(true);
                 BtnDel.gameObject.SetActive(true);
             }
         }, "选择视频", "video/*");
     }
 }
Exemplo n.º 2
0
 /**
  * 打开原生相机录制视频
  */
 private void IPhonePlayerMakeVideoOpenCamera()
 {
     NativeGallery.Permission rest1 = NativeGallery.RequestIPhonePermission(4);
     NativeGallery.Permission rest2 = NativeGallery.RequestIPhonePermission(3);
     if (rest1 == NativeGallery.Permission.Granted)
     {
         NativeGallery.IPhoneCameraMakeVideoFromGallery(backPath =>
         {
             if (backPath.IsNotNullAndEmpty())
             {
                 // 打开原生视频选择
                 UIMgr.OpenPanel <AttendanceAddPanel>(new AttendanceAddPanelData()
                 {
                     BoxId         = mData.BoxId,
                     BoxDay        = mData.BoxDay,
                     Path          = backPath,
                     ThumbnailPath = Application.temporaryCachePath + "/videoThumbnail.png",
                     Action        = AttendanceAdd.Video,
                 }, UITransitionType.CIRCLE);
                 Close();
             }
         }, "选择视频", "video/*");
     }
 }