public float GetSeekBarValue()
{
if (m_CurrentState == MEDIAPLAYER_STATE.PLAYING || m_CurrentState == MEDIAPLAYER_STATE.PAUSED || m_CurrentState == MEDIAPLAYER_STATE.END || m_CurrentState == MEDIAPLAYER_STATE.READY || m_CurrentState == MEDIAPLAYER_STATE.STOPPED)
{
if (GetDuration () == 0) {
return 0;
}
return (float)GetSeekPosition() / (float)GetDuration() ;
}
else
return 0;
}
// Update is called once per frame void Update() { if (m_bActiveDrag == false) { m_fDeltaTime += Time.deltaTime; if (m_fDeltaTime > m_fDragTime) { m_bActiveDrag = true; m_fDeltaTime = 0.0f; //if(m_fLastSetValue != m_fLastValue) // m_srcVideo.SetSeekBarValue (m_fLastValue); } } if (m_bUpdate == false) { return; } if (m_srcVideo != null) { if (m_srcSlider != null) { m_srcSlider.value = m_srcVideo.GetSeekBarValue(); } } }