private void OnApplicationQuit()
 {
     if (_mediaPlayer.IsPlaying)
     {
         _mediaPlayer.Stop();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Stop media when application is set to quit.
 /// </summary>
 private void OnApplicationQuit()
 {
     #if PLATFORM_LUMIN
     if (_mediaPlayer.IsPlaying)
     {
         _mediaPlayer.Stop();
     }
     #endif
 }
 /// <summary>
 /// Disables rendering of the video and audio.
 /// </summary>
 public void DisablePreview()
 {
     _screenRenderer.enabled = false;
     _recordingIndicator.SetActive(false);
     #if PLATFORM_LUMIN
     if (_mediaPlayer.IsPlaying)
     {
         _mediaPlayer.Stop();
     }
     #endif
 }
Exemplo n.º 4
0
        public async UniTask Hide(bool immediately = false)
        {
            _mediaPlayer.Stop();

            if (immediately)
            {
                gameObject.SetActive(false);
                return;
            }

            await Fade(false);
        }
        /// <summary>
        /// Handles video capture being started.
        /// </summary>
        public void OnCaptureStarted()
        {
            if (_mediaPlayer.IsPlaying)
            {
                _mediaPlayer.Stop();
            }

            // Manage canvas visuals
            _recordingIndicator.SetActive(true);
            _previewText.text = "Press the bumper to stop capturing a video.";

            // Disable the preview
            _screenRenderer.enabled = false;
        }
Exemplo n.º 6
0
        /// <summary>
        /// Handles video capture being started.
        /// </summary>
        public void OnCaptureStarted()
        {
            #if PLATFORM_LUMIN
            if (_mediaPlayer.IsPlaying)
            {
                _mediaPlayer.Stop();
            }
            #endif

            // Manage canvas visuals
            _recordingIndicator.SetActive(true);

            // Disable the preview
            _screenRenderer.enabled = false;
        }
        /// <summary>
        /// Handles video capture being started.
        /// </summary>
        public void OnCaptureStarted()
        {
            Debug.Log("Capture started");
            if (_mediaPlayer.IsPlaying)
            {
                _mediaPlayer.Stop();
            }

            // Manage canvas visuals
            _recordingIndicator.SetActive(true);
            _previewText.text = "Hands Up to Stop capturing a video.";
            rightHandThumbsUp.SetActive(false);
            leftHandThumbsUp.SetActive(false);
            rightHandOpenHand.SetActive(true);
            leftHandOpenHand.SetActive(true);

            // Disable the preview
            _screenRenderer.enabled = false;
        }
Exemplo n.º 8
0
 /// <summary>
 /// Handler when Stop button has been triggered. See HandleStop() for more info.
 /// </summary>
 private void Stop()
 {
     _mediaPlayer.Stop();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Handler when Stop button has been triggered. See HandleStop() for more info.
 /// </summary>
 private void Stop()
 {
     _UIUpdateTimer = float.MaxValue;
     _mediaPlayer.Stop();
 }