MediaPlayerCtrl.GetCurrentState C# (CSharp) Method

GetCurrentState() public method

public GetCurrentState ( ) : MEDIAPLAYER_STATE
return MEDIAPLAYER_STATE
	public MEDIAPLAYER_STATE GetCurrentState()
	{
		return m_CurrentState;
	}
	

Usage Example

コード例 #1
0
    void Start()
    {
        mLoadBtn.onClick.AddListener(new UnityEngine.Events.UnityAction(() =>
        {
            player.Load("EasyMovieTexture.mp4");
        }));
        mPlayBtn.onClick.AddListener(new UnityEngine.Events.UnityAction(() =>
        {
            if (player.GetCurrentState() == MediaPlayerCtrl.MEDIAPLAYER_STATE.PLAYING)
            {
                player.Stop();
                mPlayBtn.GetComponentInChildren <Text>().text = "Play";
            }
            else if (player.GetCurrentState() == MediaPlayerCtrl.MEDIAPLAYER_STATE.PAUSED)
            {
                player.Play();
                mPlayBtn.GetComponentInChildren <Text>().text = "Pause";
            }
        }));
        mQuitBtn.onClick.AddListener(new UnityEngine.Events.UnityAction(() =>
        {
            player.UnLoad();
        }));

        player.OnEnd   += OnEnd;
        player.OnReady += OnReady;
        player.OnVideoFirstFrameReady += OnFirstFrameReady;
    }
All Usage Examples Of MediaPlayerCtrl::GetCurrentState
MediaPlayerCtrl