Files
PrinceOfGlory/Assets/Scripts/Help/MeadiaLoad.cs
kridoo 6e91a0c7f0 111
2025-09-15 17:32:08 +08:00

44 lines
803 B
C#

//using RenderHeads.Media.AVProVideo;
using System.Collections;
using System.Collections.Generic;
using RenderHeads.Media.AVProVideo;
using UnityEngine;
using UnityEngine.Android;
public class MeadiaLoad : MonoBehaviour
{
public MediaPlayer player;
public string path;
// Start is called before the first frame update
void Start()
{
Play();
}
void RequestStoragePermission()
{
}
public void Play()
{
string pa = "";
#if UNITY_EDITOR
pa = VideoPathUtil.GetVideoUrlPath(path);
#else
pa ="sdcard/"+path;
#endif
Debug.Log("µØÖ·ÊǶàÉÙ:"+ pa);
player.OpenMedia(MediaPathType.AbsolutePathOrURL, pa, true);
}
void Awake()
{
}
// Update is called once per frame
void Update()
{
}
}