} //END SavePhotoToCameraRoll

        //-----------------------------//
        private void CallRequestVideoThumbnailEvent()
        //-----------------------------//
        {

#if NATSHARE
            Texture2D thumbnail = null;

            if( IsThumbnailAtPath() && assetPathOfVideo != null && assetPathOfVideo != "" )
            {
                thumbnail = NatShare.GetThumbnail( assetPathOfVideo, timeInVideoForThumbnail );
            }
            else if( IsThumbnailAtBlockEventRecorder() && blockEventRecorderWithVideo != null )
            {
                if( blockEventRecorderWithVideo.recordedVideos != null && blockEventRecorderWithVideo.recordedVideos.Count > 0 )
                {
                    if( thumbnailType == RecorderThumbnailType.GetThumbnailFromLatestVideo )
                    {
                        thumbnail = NatShare.GetThumbnail( blockEventRecorderWithVideo.recordedVideos[ blockEventRecorderWithVideo.recordedVideos.Count - 1 ], timeInVideoForThumbnail );
                    }
                    else if( thumbnailType == RecorderThumbnailType.GetThumbnailFromFirstVideo )
                    {
                        thumbnail = NatShare.GetThumbnail( blockEventRecorderWithVideo.recordedVideos[0], timeInVideoForThumbnail );
                    }
                }
                
            }
            
            if( thumbnail != null )
            {
                RequestThumbnailComplete( thumbnail );
            }

#else
            Debug.LogError("BlockEventNativeSharing.cs CallRequestVideoThumbnailEvent() ERROR: Missing NATSHARE scripting define symbol under project settings");
#endif

        } //END CallRequestVideoThumbnailEvent
Exemple #2
0
 public void GetThumbnail(string videoPath, Action <Texture2D> callback)
 {
     NatShare.GetThumbnail(videoPath, callback);
 }