// Update is called once per frame void Update() { position = m_Texture.Player.GetPosition() / 1000; duration = m_Texture.Player.GetDuration() / 1000; if (Input.GetKeyDown(KeyCode.LeftArrow)) { var p = (position - 5000); if (p < 0) { p = 0; } m_Texture.Player.Seek(p * 1000); } if (Input.GetKeyDown(KeyCode.RightArrow)) { var p = (position + 5000); if (p >= duration) { p = duration; } m_Texture.Player.Seek(p * 1000); } if (Input.GetKeyDown(KeyCode.S)) { m_Texture.Stop(); } if (Input.GetKeyDown(KeyCode.P)) { m_Texture.Play(); } }
// Update is called once per frame void Update() { /* * string selectedCamera = CameraManager.GetInstance().GetSelection(); * if(selectedCamera != actualCamera){ * Initialize(selectedCamera); * Debug.Log ("New video..."); * * } */ position = m_Texture.Player.GetPosition() / 1000; duration = m_Texture.Player.GetDuration() / 1000; if (Input.GetKeyDown(KeyCode.LeftArrow)) { var p = (position - 5000); if (p < 0) { p = 0; } m_Texture.Player.Seek(p * 1000); } if (Input.GetKeyDown(KeyCode.RightArrow)) { var p = (position + 5000); if (p >= duration) { p = duration; } m_Texture.Player.Seek(p * 1000); } if (Input.GetKeyDown(KeyCode.S)) { m_Texture.Stop(); } if (Input.GetKeyDown(KeyCode.P)) { m_Texture.Play(); } }
public void StopPlayer() { m_Texture.Stop(); }