using System; using System.Collections.Generic; using System.Threading; using UnityEngine; using UnityEngine.UI; using UnityEngine.Serialization; using Agora.Rtc; using Agora.Util; using Logger = Agora.Util.Logger; using Random = UnityEngine.Random; using System.IO; using System.Runtime.InteropServices; namespace Agora_RTC_Plugin.API_Example.Examples.Advanced.MediaPlayerWithCustomDataProviderExample { public class MediaPlayerWithCustomDataProviderExample : MonoBehaviour { [FormerlySerializedAs("appIdInput")] [SerializeField] private AppIdInput _appIdInput; [Header("_____________Basic Configuration_____________")] [FormerlySerializedAs("APP_ID")] [SerializeField] private string _appID = ""; [FormerlySerializedAs("TOKEN")] [SerializeField] private string _token = ""; [FormerlySerializedAs("CHANNEL_NAME")] [SerializeField] private string _channelName = ""; public Text LogText; internal Logger Log; internal IRtcEngine RtcEngine = null; internal IMediaPlayer MediaPlayer = null; internal UserPlayerCustomDataProvider customDataProvider = null; private Button _button1; private Button _button2; private Button _button3; private Button _button4; private Button _button5; // Use this for initialization private void Start() { LoadAssetData(); if (CheckAppId()) { SetUpUI(); //EnableUI(false); InitEngine(); InitMediaPlayer(); JoinChannelWithMPK(); } } // Update is called once per frame private void Update() { PermissionHelper.RequestMicrophontPermission(); PermissionHelper.RequestCameraPermission(); } private void SetUpUI() { _button1 = GameObject.Find("Button1").GetComponent