Exemplo n.º 1
0
        /// <summary>
        /// Event Handler when a Seek() operation is initiated. For non-local media,
        /// this means it has started buffering.
        /// </summary>
        /// <param name="percent">Percent of whole duration (0.0f to 1.0f)</param>
        private void HandleSeekStarted(float percent)
        {
            int lastTimeSoughtMs = Mathf.RoundToInt(percent * _mediaPlayer.GetDurationMs());

            _isSeeking              = true;
            _rewindButton.enabled   = false;
            _forwardButton.enabled  = false;
            _timelineSlider.enabled = false;
            _timelineSlider.Value   = percent;
            UpdateElapsedTime(lastTimeSoughtMs);
        }