摄像头调整
This commit is contained in:
@ -66,7 +66,7 @@ var AVProVideoWebGL =
|
|||||||
// NOTE: When loading from the indexedDB (Application.persistentDataPath),
|
// NOTE: When loading from the indexedDB (Application.persistentDataPath),
|
||||||
// URL.createObjectURL() must be used get a valid URL. See:
|
// URL.createObjectURL() must be used get a valid URL. See:
|
||||||
// http://www.misfitgeek.com/html5-off-line-storing-and-retrieving-videos-with-indexeddb/
|
// http://www.misfitgeek.com/html5-off-line-storing-and-retrieving-videos-with-indexeddb/
|
||||||
path = Pointer_stringify(path);
|
path = UTF8ToString(path);
|
||||||
_count++;
|
_count++;
|
||||||
|
|
||||||
var vid = document.createElement("video");
|
var vid = document.createElement("video");
|
||||||
|
10720
Assets/Scenes/UI.unity
10720
Assets/Scenes/UI.unity
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,7 @@ using System.Security.Cryptography;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using RenderHeads.Media.AVProVideo;
|
using RenderHeads.Media.AVProVideo;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class VideoPlayerUrlTool : MonoBehaviour
|
public class VideoPlayerUrlTool : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -26,6 +27,9 @@ public class VideoPlayerUrlTool : MonoBehaviour
|
|||||||
private LCLiveListData listData;
|
private LCLiveListData listData;
|
||||||
public LClives[] LClive;
|
public LClives[] LClive;
|
||||||
public UMPTool[] videos;
|
public UMPTool[] videos;
|
||||||
|
public Text Index;
|
||||||
|
public Text Rate;
|
||||||
|
private int Sum = 0;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@ -99,12 +103,18 @@ public class VideoPlayerUrlTool : MonoBehaviour
|
|||||||
LCLiveListData flv = JsonConvert.DeserializeObject<LCLiveListData>(uwr.downloadHandler.text);
|
LCLiveListData flv = JsonConvert.DeserializeObject<LCLiveListData>(uwr.downloadHandler.text);
|
||||||
LClive = flv.result.data.lives;
|
LClive = flv.result.data.lives;
|
||||||
|
|
||||||
|
Sum = 0;
|
||||||
for (int i = 0; i < videos.Length; i++)
|
for (int i = 0; i < videos.Length; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < LClive.Length; j++)
|
for (int j = 0; j < LClive.Length; j++)
|
||||||
{
|
{
|
||||||
if (LClive[j].deviceId == videos[i].deviceId && LClive[j].channelId == videos[i].channelId)
|
if (LClive[j].deviceId == videos[i].deviceId && LClive[j].channelId == videos[i].channelId)
|
||||||
{
|
{
|
||||||
|
if (LClive[j].liveType == 1)
|
||||||
|
{
|
||||||
|
Sum++;
|
||||||
|
}
|
||||||
|
|
||||||
videos[i].GetComponent<UMPTool>().mediaPlayer
|
videos[i].GetComponent<UMPTool>().mediaPlayer
|
||||||
.OpenMedia(new MediaPath(LClive[j].streams[0].hls, MediaPathType.AbsolutePathOrURL));
|
.OpenMedia(new MediaPath(LClive[j].streams[0].hls, MediaPathType.AbsolutePathOrURL));
|
||||||
|
|
||||||
@ -116,6 +126,9 @@ public class VideoPlayerUrlTool : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Index.text = "<size=30>"+Sum+"</size> 个";
|
||||||
|
Rate.text = "<size=30>"+ ((float)Sum / 29 * 100).ToString("f2")+"</size> %";
|
||||||
|
|
||||||
UMPController.Inst.UMPPlayer("页面一(首页)");
|
UMPController.Inst.UMPPlayer("页面一(首页)");
|
||||||
|
|
||||||
if (uwr.isHttpError || uwr.isNetworkError)
|
if (uwr.isHttpError || uwr.isNetworkError)
|
||||||
|
Reference in New Issue
Block a user