Ejemplo n.º 1
0
        /// <summary>
        /// 動作を再生/停止
        /// </summary>
        public void PlayButton()
        {
            if (isPlaying)
            {
                // 停止

                if (videoPlayer)
                {
                    videoPlayer.Stop();
                }
                //if (videoPlayer) videoPlayer.Pause();

                isPlaying   = false;
                currentKoma = 0;
                ApplyPose(currentFrame);
            }
            else
            {
                // 再生開始

                if (videoPlayer)
                {
                    videoPlayer.Play();
                }

                currentKoma = 0;
                startedTime = Time.time;
                isPlaying   = true;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 動作を再生/停止
        /// </summary>
        public void PlayButton()
        {
            if (isPlaying)
            {
                // 停止

                if (videoPlayer)
                {
                    videoPlayer.Stop();
                }
                //if (videoPlayer) videoPlayer.Pause();

                isPlaying   = false;
                currentKoma = 0;

                // 停止中はキーフレーム単位の姿勢合わせ状態にしておく
                ApplyPose(currentFrame);
            }
            else
            {
                // 再生開始

                if (videoPlayer)
                {
                    videoPlayer.Play();
                }

                currentKoma = firstKoma;
                startedTime = Time.time - ((float)firstKoma / fps);
                isPlaying   = true;
            }
        }
Ejemplo n.º 3
0
        public void Close(bool freePlayer, bool freeAudio, bool freeRenderTexture)
        {
            mVideoPlayer.Stop();
            mAudioSource.Stop();

            if (freePlayer)
            {
                GameObject.Destroy(mVideoPlayer);
                mVideoPlayer = null;
            }

            if (freeAudio)
            {
                GameObject.Destroy(mAudioSource);
                mAudioSource = null;
            }

            if (freeRenderTexture)
            {
                GameObject.Destroy(mRenderTexture);
                mRenderTexture = null;
            }

            mVideoHolder = null;
            mPromoData   = null;
            mEndCallback = null;
        }
 public void VideoStop()
 {
     videoPlayer.Stop();
     if (playEnumerator != null)
     {
         StopCoroutine(playEnumerator);
     }
 }
Ejemplo n.º 5
0
        public void Close()
        {
            videoPlayer.Stop();

            animation.PlayOutTween()
            .OnComplete(() =>
            {
                timeline.Reset();

                gameObject.SetActive(false);
            });
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Stop the video.
        /// </summary>
        public void Stop()
        {
            if (CurrentState != StateType.Started)
            {
                return;
            }
#if USE_EASY_MOVIE_TEXTURE
            if (easyMovieTexture == null)
            {
                return;
            }
            easyMovieTexture.Stop();
#elif USE_UNITY_VIDEO_PLAYER
            if (videoPlayer == null)
            {
                return;
            }
            videoPlayer.Stop();
#elif USE_ANDROID_MEDIA_PLAYER
            if (mediaPlayer == null)
            {
                return;
            }
            Pause();
            try
            {
                mediaPlayer.Call("seekTo", 0);
            }
            catch (Exception e)
            {
                Debug.LogError(TAG + " Failed to stop mediaPlayer: " + e.Message);
                UpdateState(StateType.Error);
            }
#elif USE_VIVE_MEDIA_DECODER
            if (mediaDecoder == null)
            {
                return;
            }
            Pause();
            mediaDecoder.setSeekTime(0);
#else
            if (movieTexture == null || audioSource == null)
            {
                return;
            }
            movieTexture.Stop();
            audioSource.Stop();
#endif
            UpdateState(StateType.Stopped);
        }
Ejemplo n.º 7
0
 private void DoTriggerReleased(object sender, ControllerInteractionEventArgs e)
 {
     tooltipAnimator.Play("DisappearAnimation");
     video.Stop();
 }
 public override void Stop()
 {
     _mediaPlayer.Stop();
     Events.OnClipPlaybackStopped();
 }
Ejemplo n.º 9
0
 public void StopPlaying()
 {
     videoPlayerImpl.Stop();
 }