// Starts streaming based on input
        private void StartStream(bool demoMode = false)
        {
            demoModeActive = demoMode;

            cameraStreamService = new CameraStreamService(demoMode);
            cameraStreamService.Start();

            streamHasStarted = true;
        }
        protected override void Dispose(bool disposing)
        {
            cameraStreamService.Dispose();
            cameraStreamService = null;

            // Update the application when a new screen layout is set in the view model
            MessagingCenter.Unsubscribe <CameraPageViewModel, string>(this, MessageSubject.SET_CAMERA_SCREEN_LAYOUT);
            MessagingCenter.Unsubscribe <CameraPageViewModel, bool>(this, MessageSubject.STREAM_START);

            base.Dispose(disposing);
        }