GetSeekBarValue() public method

public GetSeekBarValue ( ) : float
return float
Beispiel #1
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();
            }
        }
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        if (VideoUImanager.instance.seekBarLoad == false)
        {
            if (SceneManager.GetActiveScene().name == "Main")
            {
                //查找赋值
                m_srcVideo =
                    LightManger.instance.VideoScreen.transform.Find("VideoScreen").GetComponent <MediaPlayerCtrl>();


                Debug.Log("eeeeeee");
            }
            //   else if (SceneManager.GetActiveScene().name == "PlayerVR")

            else if (SceneManager.GetActiveScene().name == "MainVR")
            {
                if (LauncherUIManager.instance.columnType == ColumnType.VR)
                {
                    m_srcVideo = LightManger.instance.VideoScreenVR.GetComponent <MediaPlayerCtrl>();
                }
                else
                {
                    m_srcVideo = LightManger.instance.VideoScreen.transform.Find("VideoScreen").GetComponent <MediaPlayerCtrl>();
                }
            }
            VideoUImanager.instance.seekBarLoad = true;
        }


        //   }

        if (videoUpdate == false)//表示正常状态没有对slider进行操作
        {
            return;
        }

        if (m_srcVideo != null)
        {
            if (m_srcSlider != null)
            {
                m_srcSlider.value = m_srcVideo.GetSeekBarValue();
            }
        }
        if (m_srcVideo.GetCurrentState() == MEDIAPLAYER_STATE.PLAYING)//播放状态显示视频时长
        {
            currentTime.text = GetCurrentTime();
            if (getTotalBo == false)
            {
                totalTime.text = GetTatalTime();
                getTotalBo     = true;
            }
        }
    }