示例#1
0
        void Awake()
        {
            try {
                ShareRECImpl.Init(AppKey, AppSecret, gameObject.name, (int)MaxFrameSize);
                ShareRECImpl.SetVideoQuality((int)VideoQuality);

                //获取手机型号信息,判断是否开启GLES30API
                bool NeedOpenGLES30 = false;
                if (NeedOpenGLES30)
                {
                    useGLES30API();
                }
                ShareRECImpl.SetForceSoftwareEncoding(SoftwareVideoEncoder, SoftwareAudioEncoder);
                ShareRECImpl.SetCacheFolder(CacheFolder);
                ShareRECImpl.SetMinDuration(MinDuration);
                if (RecordAudioFromMic)
                {
                    ShareRECImpl.SetRecordAudioFromMic();
                }
                if (RecordGUILayer)
                {
                    ShareRECImpl.SetRecordGUILayer();
                }
            } catch (Exception e) {}
            InitializeFrontMostCamera();
            InitializeBackMostCamera();
        }
示例#2
0
 void Awake()
 {
     try {
         ShareRECImpl.Init(AppKey, AppSecret, gameObject.name, (int)MaxFrameSize);
         ShareRECImpl.SetVideoQuality((int)VideoQuality);
         ShareRECImpl.SetForceSoftwareEncoding(SoftwareVideoEncoder, SoftwareAudioEncoder);
         ShareRECImpl.SetCacheFolder(CacheFolder);
         ShareRECImpl.SetMinDuration(MinDuration);
         if (RecordAudioFromMic)
         {
             ShareRECImpl.SetRecordAudioFromMic();
         }
                 #if (!UNITY_5_6_OR_NEWER)
         if (RecordGUILayer)
         {
             ShareRECImpl.SetRecordGUILayer();
         }
                 #endif
     } catch (Exception e) {}
     InitializeFrontMostCamera();
     InitializeBackMostCamera();
 }