using System;
using UnityEngine;

namespace RenderHeads.Media.AVProVideo.Demos
{
	public class ChangeVideoExample : MonoBehaviour
	{
		public void NewVideo(string filePath)
		{
			this.mp.m_AutoStart = true;
			this.mp.OpenVideoFromFile(MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder, filePath, false);
		}

		private void OnGUI()
		{
			if (GUILayout.Button("video1", new GUILayoutOption[0]))
			{
				this.NewVideo("video1.mp4");
			}
			if (GUILayout.Button("video2", new GUILayoutOption[0]))
			{
				this.NewVideo("video2.mp4");
			}
		}

		public MediaPlayer mp;
	}
}
