27 lines
731 B
C#
27 lines
731 B
C#
using RenderHeads.Media.AVProVideo;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using ZXKFramework;
|
|
namespace DongWuYiXue.DaoNiaoShu {
|
|
public class PlayVideo : MonoBehaviour
|
|
{
|
|
public GameObject maxObj;
|
|
DisplayUGUI displayUGUI;
|
|
|
|
private void Start()
|
|
{
|
|
displayUGUI = maxObj.FindFirst<DisplayUGUI>("disPlay");
|
|
GetComponent<Button>().onClick.AddListener(Play);
|
|
}
|
|
|
|
private void Play()
|
|
{
|
|
maxObj.gameObject.SetActive(true);
|
|
displayUGUI.Player = GetComponentInParent<MediaPlayer>();
|
|
GetComponentInParent<MediaPlayer>().Play();
|
|
}
|
|
}
|
|
} |