IEnumerator OnUpdateSeekSlider() { for (;;) { yield return(null); if (seekSlider != null && AVPlayerConnect.AVPlayerIsPlaying(avPlayer)) { if (!isSeekSliderDoing && !isSeekWaiting) { float current = AVPlayerConnect.AVPlayerGetCurrentPosition(avPlayer); seekSlider.value = current; } } } }
IEnumerator OnUpdateText() { for (;;) { yield return(null); float current = AVPlayerConnect.AVPlayerGetCurrentPosition(avPlayer); float duration = videoDuration; if (currentTimeText != null) { currentTimeText.text = "[" + current + " | " + duration + "]"; } } }