|
@@ -21,6 +21,8 @@ public class VideoPlayerController : MonoBehaviour
|
|
|
public static string brand = "";
|
|
|
public static string devNo = "";
|
|
|
public static string ip = "";
|
|
|
+ public static string username = "";
|
|
|
+ public static string pwd = "";
|
|
|
public bool isSelected = false;//配置界面是否显示
|
|
|
public bool isShowTip = true;//是否显示标签
|
|
|
// Start is called before the first frame update
|
|
@@ -113,11 +115,11 @@ public class VideoPlayerController : MonoBehaviour
|
|
|
getVideoChannel(text);
|
|
|
if (ip != ""&&brand!="")
|
|
|
{
|
|
|
- RealTimePlayer(brand,ip,devNo, true);
|
|
|
+ RealTimePlayer(brand,ip,devNo,username,pwd, true);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- RealTimePlayer("", "","1", false);
|
|
|
+ RealTimePlayer("", "","1","","", false);
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
@@ -138,6 +140,8 @@ public class VideoPlayerController : MonoBehaviour
|
|
|
brand = info.manufacturerInfo.manufacturerCode;
|
|
|
ip = info.ip;
|
|
|
devNo=info.devNo.ToString();
|
|
|
+ username = info.devUserName;
|
|
|
+ pwd = info.devPassword;
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -145,22 +149,26 @@ public class VideoPlayerController : MonoBehaviour
|
|
|
brand = "";
|
|
|
ip = "";
|
|
|
devNo = "";
|
|
|
+ username = "";
|
|
|
+ pwd = "";
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 实时播放
|
|
|
/// </summary>
|
|
|
/// <param name="channel"></param>
|
|
|
/// <param name="isPlayer"></param>
|
|
|
- public void RealTimePlayer(string brand,string ip, string devNo,bool isPlayer)
|
|
|
+ public void RealTimePlayer(string brand,string ip, string devNo, string username, string pwd, bool isPlayer)
|
|
|
{
|
|
|
if (isPlayer)
|
|
|
{
|
|
|
MainCameraController.brand = brand;
|
|
|
MainCameraController.ip = ip;
|
|
|
MainCameraController.devNo = devNo;
|
|
|
+ MainCameraController.username = username;
|
|
|
+ MainCameraController.pwd = pwd;
|
|
|
//if (!isPlayed)
|
|
|
//{
|
|
|
- Vplay.onClick.Invoke();
|
|
|
+ Vplay.onClick.Invoke();
|
|
|
isPlayed = true;
|
|
|
// }
|
|
|
}
|
|
@@ -169,6 +177,8 @@ public class VideoPlayerController : MonoBehaviour
|
|
|
MainCameraController.brand = brand;
|
|
|
MainCameraController.ip = ip;
|
|
|
MainCameraController.devNo = devNo;
|
|
|
+ MainCameraController.username = username;
|
|
|
+ MainCameraController.pwd = pwd;
|
|
|
isPlayed = false;
|
|
|
}
|
|
|
}
|