using RenderHeads.Media.AVProVideo; using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestAVProVideo : MonoBehaviour { public MediaPlayer mdiaPlayer; void Start() { // mdiaPlayer.GetComponent(); mdiaPlayer.OpenMedia( new MediaPath("https://1500015345.vod2.myqcloud.com/43964222vodtranscq1500015345/89bc0ce13270835009794111349/v.f100010.mp4", MediaPathType.AbsolutePathOrURL),true); mdiaPlayer.Play(); StartCoroutine(DesMdiaPlayer(5f)); } private IEnumerator DesMdiaPlayer(float times) { yield return new WaitForSeconds(times); Destroy(gameObject); } }