예제 #1
0
 /// <summary>
 /// 恢复录制(Resumes the recorder module)
 /// </summary>
 public static void ResumeRecorder()
 {
     ShareRECImpl.Resume();
     pause = false;
 }
예제 #2
0
 /// <summary>
 /// 通过缓存的视频ID获取本地路径(Gets the local video path by its ID.)
 /// </summary>
 public static string GetLocalVideoPath(long videoId)
 {
     return(ShareRECImpl.GetLocalVideoPath(videoId));
 }
예제 #3
0
 /// <summary>
 /// 打开视频中心(Shows the video center.)
 /// </summary>
 public static void ShowVideoCenter()
 {
     ShareRECImpl.ShowVideoCenter();
 }
예제 #4
0
 /// <summary>
 /// 显示分享页面(Shows the share page.)
 /// </summary>
 public static void ShowShare()
 {
     ShareRECImpl.ShowShare();
 }
예제 #5
0
 /// <summary>
 /// 添加视频的自定义属性(Adds the custom attributes of the video.)
 /// </summary>
 public static void AddCustomAttr(string key, string value)
 {
     ShareRECImpl.AddCustomAttr(key, value);
 }
예제 #6
0
 /// <summary>
 /// 暂停录制模块(Pauses the recorder module)
 /// </summary>
 public static void PauseRecorder()
 {
     ShareRECImpl.Pause();
 }
예제 #7
0
 public static void ShowLocalVideos()
 {
     ShareRECImpl.ShowLocalVideos();
 }
예제 #8
0
 public static RECBar GetRECBar(MonoBehaviour script)
 {
     return(ShareRECImpl.GetRECBar(script.gameObject.name, "onRecBarAction"));
 }
예제 #9
0
 /// <summary>
 /// 设置监听分享操作的回调,通过onShareComplete,onShareCancel,onShareError监听
 /// </summary>
 public static void setShareActionEnable()
 {
     ShareRECImpl.setShareActionEnable();
 }
예제 #10
0
 public static void ShowLastVideo()
 {
     ShareRECImpl.ShowLastVideo();
 }
예제 #11
0
 /// <summary>
 /// 设置分享的时候先上传,上传成功后再分享
 /// </summary>
 public static void setShareAfterUpload()
 {
     ShareRECImpl.setShareAfterUpload();
 }
예제 #12
0
 /// <summary>
 /// 启用GLES30
 /// </summary>
 public static void UseGLES30API()
 {
     ShareRECImpl.useGLES30API();
 }
예제 #13
0
 /// <summary>
 /// 停止录制模块 (Stop the recorder module)
 /// </summary>
 public static void StopRecorder()
 {
     ShareRECImpl.Stop();
     recorder = false;
 }
예제 #14
0
 /// <summary>
 /// 删除缓存视频(Deletes the local video by its ID.)
 /// </summary>
 public static void DeleteLocalVideo(long videoId)
 {
     ShareRECImpl.DeleteLocalVideo(videoId);
 }
예제 #15
0
 /// <summary>
 /// 不使用默认的record进行录音,使用自定义的录音方式录音  Prepares the sound copying.
 /// 注意,需要再 执行 StartRecorder()方法之前调用,否则无效
 /// </summary>
 public static void PrepareSoundCopying(int channelCount, int sampleRate, int maxBufferSizeInBytes)
 {
     ShareRECImpl.PrepareSoundCopying(channelCount, sampleRate, maxBufferSizeInBytes);
 }
예제 #16
0
 /// <summary>
 /// 添加要录屏的cmaera(add record camera.)
 /// </summary>
 public static void addCameraRecord(RenderTexture src)
 {
     ShareRECImpl.addCameraRecord(src);
 }
예제 #17
0
 /// <summary>
 /// 将录音得到的 数据添加到录制的视频数据里 Offers the sample.
 /// </summary>
 public static void OfferSample(byte[] sample, int offset, int len)
 {
     ShareRECImpl.OfferSample(sample, offset, len);
 }
예제 #18
0
        // =======================================

        /// <summary>
        /// 设置视频描述文本(Sets the description of the video.)
        /// </summary>
        public static void SetText(string text)
        {
            ShareRECImpl.SetText(text);
        }
예제 #19
0
        private void onStateChange(string action)
        {
            int iAction = -1;

            if (!Int32.TryParse(action, out iAction))
            {
                return;
            }

            switch (iAction)
            {
            case STATE_STARTING: {
                if (OnRecorderStartingHandler != null)
                {
                    OnRecorderStartingHandler();
                }
            } break;

            case STATE_STARTED: {
                if (curAction == STATE_RESUMING)
                {
                    if (OnRecorderResumedHandler != null)
                    {
                        OnRecorderResumedHandler();
                    }
                }
                else if (OnRecorderStartedHandler != null)
                {
                    OnRecorderStartedHandler();
                }
            } break;

            case STATE_PAUSING: {
                if (OnRecorderPausingHandler != null)
                {
                    OnRecorderPausingHandler();
                }
            } break;

            case STATE_PAUSED: {
                if (OnRecorderPausedHandler != null)
                {
                    OnRecorderPausedHandler();
                }
            } break;

            case STATE_RESUMING: {
                if (OnRecorderResumingHandler != null)
                {
                    OnRecorderResumingHandler();
                }
            } break;

            case STATE_STOPPING: {
                if (OnRecorderStoppingHandler != null)
                {
                    OnRecorderStoppingHandler();
                }
            } break;

            case STATE_STOPPED: {
                beginHanlder.enabled = false;
                endHanlder.enabled   = false;
                ShareRECImpl.ReleaseRenderTexture();
                if (OnRecorderStoppedHandler != null)
                {
                    OnRecorderStoppedHandler();
                }
            } break;
            }

            curAction = iAction;
        }
예제 #20
0
        // =======================================

        /// <summary>
        /// 判断ShareRec是否支持当前的设备(Determines whether ShareRec is available for the current device.)
        /// </summary>
        public static bool IsAvailable()
        {
            return(ShareRECImpl.IsAvailable());
        }
예제 #21
0
 /// <summary>
 /// 在视屏预览界面菜单添加自定义分享平台(Sets custom share platform in video preview menu)
 /// </summary>
 public static void AddCustomPlatform(string name)
 {
     ShareRECImpl.AddCustomPlatform(name);
 }
예제 #22
0
 /// <summary>
 /// 恢复录制(Resumes the recorder module)
 /// </summary>
 public static void ResumeRecorder()
 {
     ShareRECImpl.Resume();
 }
예제 #23
0
 /// <summary>
 /// 停止录制模块 (Stop the recorder module)
 /// </summary>
 public static void StopRecorder()
 {
     ShareRECImpl.Stop();
 }
예제 #24
0
 /// <summary>
 /// 显示用户资料(Shows the user profile.)
 /// </summary>
 public static void ShowProfile()
 {
     ShareRECImpl.ShowProfile();
 }
예제 #25
0
 /// <summary>
 /// 列出本地已经缓存的视频(Lists the local videos.)
 /// </summary>
 public static long[] ListLocalVideos()
 {
     return(ShareRECImpl.ListLocalVideos());
 }
예제 #26
0
 /// <summary>
 /// 清除ShareRec的缓存目录(Clears the cache folder of ShareRec.)
 /// </summary>
 public static void ClearCache()
 {
     ShareRECImpl.ClearCache();
 }
예제 #27
0
 /// <summary>
 /// 暂停录制模块(Pauses the recorder module)
 /// </summary>
 public static void PauseRecorder()
 {
     pause = true;
     ShareRECImpl.Pause();
 }