Ejemplo n.º 1
0
    IEnumerator OnUpdateSeekSlider()
    {
        for (;;)
        {
            yield return(null);

            if (seekSlider != null && AVPlayerConnect.AVPlayerIsPlaying(avPlayer))
            {
                if (!isSeekSliderDoing && !isSeekWaiting)
                {
                    float current = AVPlayerConnect.AVPlayerGetCurrentPosition(avPlayer);
                    seekSlider.value = current;
                }
            }
        }
    }
Ejemplo n.º 2
0
    IEnumerator OnUpdateText()
    {
        for (;;)
        {
            yield return(null);

            float current  = AVPlayerConnect.AVPlayerGetCurrentPosition(avPlayer);
            float duration = videoDuration;
            if (currentTimeText != null)
            {
                currentTimeText.text = "["
                                       + current
                                       + " | "
                                       + duration
                                       + "]";
            }
        }
    }