44 lines
803 B
C#
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()
|
|
{
|
|
|
|
}
|
|
}
|