public Presenter(PresenterSettings presenterSettings) { try { _presenterSettings = presenterSettings; _videoCapture = _presenterSettings.VideoCaptureControl; _audioStreamManager = new AudioStreamManager(_presenterSettings.AudioTimerInterval, _presenterSettings.OnAudioCaptureAvailable); // initialize the image capture size if (_videoCapture != null) { _videoCapture.ImageHeight = presenterSettings.VideoScreenSize.Height; _videoCapture.ImageWidth = presenterSettings.VideoScreenSize.Width; _firstTimeCapturing = true; // bind the image captured event _videoCapture.ImageCaptured += new Delegates.WebCamEventHandler(presenterSettings.OnVideoImageCaptured); } _screenCaptureTool = new ScreenCaptureTool(_presenterSettings.RemotingTimerInterval, _presenterSettings.OnRemotingImageCaptured); } catch (Exception ex) { Tools.Instance.Logger.LogError(ex.ToString()); } }
private void Awake() { if (Instance != null) { Destroy(gameObject); return; } Instance = this; DontDestroyOnLoad(gameObject); Init(); }