adadaa
This commit is contained in:
parent
e197bc905f
commit
96358b1e04
|
@ -147,8 +147,8 @@ MonoBehaviour:
|
|||
transparency: 0
|
||||
alphaPacking: 0
|
||||
stereoPacking: 0
|
||||
_autoOpen: 1
|
||||
_autoPlayOnStart: 1
|
||||
_autoOpen: 0
|
||||
_autoPlayOnStart: 0
|
||||
_loop: 1
|
||||
_audioVolume: 1
|
||||
_audioBalance: 0
|
||||
|
|
|
@ -7,6 +7,11 @@ using TMPro;
|
|||
using ZenFulcrum.EmbeddedBrowser;
|
||||
using Competition.Mysql.Model;
|
||||
using RenderHeads.Media.AVProVideo;
|
||||
using Newtonsoft.Json;
|
||||
using static ZenFulcrum.EmbeddedBrowser.Browser;
|
||||
using UnityEditor.Rendering;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Net;
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -86,8 +91,47 @@ public class VideoWebPage : PanelBase
|
|||
|
||||
//WebPage.Url = ApiManager.Instance.ApiDic["VideoWebUrl"] + "?src=http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
|
||||
|
||||
|
||||
//avpro
|
||||
mediaPlayer.OpenMedia(new MediaPath("http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8", MediaPathType.AbsolutePathOrURL),true);
|
||||
string postUrl = ApiManager.Instance.ApiDic["VideoWebUrl"];
|
||||
MyData myData = new MyData();
|
||||
Data data = new Data();
|
||||
data.cameraIndexCode = "35162241101320503007";
|
||||
data.protocol = "hls";
|
||||
myData.path = "/artemis/api/video/v2/cameras/previewURLs";
|
||||
myData.data = data;
|
||||
StartCoroutine(RequestBase.Post(postUrl, JsonConvert.SerializeObject(myData), (_data, _error) =>
|
||||
{
|
||||
if (_error != null)
|
||||
{
|
||||
Debug.Log($"模糊查询接口错误:<color=#ff0000> {_error} </color>");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("接口返回值: " + _data);
|
||||
JObject jo = JObject.Parse(_data);
|
||||
if (jo["code"].ToObject<int>() == 0)
|
||||
{
|
||||
mediaPlayer.OpenMedia(new MediaPath(jo["result"]["data"]["url"].ToString(), MediaPathType.AbsolutePathOrURL), true);
|
||||
Debug.Log("播放画面");
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public class MyData
|
||||
{
|
||||
public string path;
|
||||
public Data data;
|
||||
}
|
||||
public class Data
|
||||
{
|
||||
public string cameraIndexCode;
|
||||
public string protocol;
|
||||
}
|
||||
|
||||
public class MyResult
|
||||
{
|
||||
public int code;
|
||||
public string type;
|
||||
public string result;
|
||||
}
|
|
@ -16,5 +16,5 @@
|
|||
"GetBoCiByYear": "/api/Storage/GetBoCiByYear",
|
||||
"GetInNumByYear": "/api/Storage/GetInNumByYear",
|
||||
"GetInNumWithCurrent": "/api/Storage/GetInNumWithCurrent",
|
||||
"VideoWebUrl": "http://111.229.30.246:4001/demo.html"
|
||||
"VideoWebUrl": "http://127.0.0.1:12307/cameras/hikvision/"
|
||||
}
|
|
@ -2,14 +2,14 @@
|
|||
{
|
||||
"MONITOR_ID": "CNMAW350015",
|
||||
"DATA": {
|
||||
"01": "Camera000100",
|
||||
"02": "Camera000101",
|
||||
"03": "Camera000102",
|
||||
"04": "Camera000103",
|
||||
"05": "Camera000104",
|
||||
"06": "Camera000105",
|
||||
"07": "Camera000106",
|
||||
"08": "Camera000107",
|
||||
"01": "Camera000591",
|
||||
"02": "Camera000592",
|
||||
"03": "Camera000593",
|
||||
"04": "",
|
||||
"05": "",
|
||||
"06": "",
|
||||
"07": "",
|
||||
"08": "",
|
||||
"09": "",
|
||||
"10": "",
|
||||
"11": "",
|
||||
|
|
Loading…
Reference in New Issue