TestAVProVideo.cs 679 B

12345678910111213141516171819202122
  1. using RenderHeads.Media.AVProVideo;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. public class TestAVProVideo : MonoBehaviour
  6. {
  7. public MediaPlayer mdiaPlayer;
  8. void Start()
  9. {
  10. // mdiaPlayer.GetComponent<MediaPlayer>();
  11. mdiaPlayer.MediaPath = new MediaPath("https://1500015345.vod2.myqcloud.com/43964222vodtranscq1500015345/89bc0ce13270835009794111349/v.f100010.mp4", MediaPathType.AbsolutePathOrURL);
  12. mdiaPlayer.Play();
  13. StartCoroutine(DesMdiaPlayer(5f));
  14. }
  15. private IEnumerator DesMdiaPlayer(float times)
  16. {
  17. yield return new WaitForSeconds(times);
  18. Destroy(gameObject);
  19. }
  20. }