From 2df906a447195f9786dd468512ea895d6cc18532 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期四, 15 五月 2025 14:53:54 +0800
Subject: [PATCH] APP3.5开发

---
 igds-app/js/admin/security-video.js |   92 +++++++++++++++++++++++++--------------------
 1 files changed, 51 insertions(+), 41 deletions(-)

diff --git a/igds-app/js/admin/security-video.js b/igds-app/js/admin/security-video.js
index 98d34ab..e24ad2f 100644
--- a/igds-app/js/admin/security-video.js
+++ b/igds-app/js/admin/security-video.js
@@ -28,7 +28,7 @@
 	data.tokenAuth = user.tokenAuth;
 	data1.tokenAuth = user.tokenAuth;
 	data.data.deptId = selectDeptId;
-	url = user.url + "/api-phone/v35/gateway";
+	url = user.url + "/api/phone/v35/gateway";
 
 	getVideoList();
 
@@ -57,35 +57,35 @@
 			mui.alert('绯荤粺绻佸繖,璇烽噸璇曪紒', '鎻愮ず', ["纭畾"], function() {}, "div");
 		}
 	})
-	videoList = [{
-			"id": "45",
-			"name": "涓滃浘涔犲",
-			"status": "01",
-			"playType": "id ea",
-			"type": "02"
-		},
-		{
-			"id": "52",
-			"name": "鑰佸嚭浜蹭簨鍏�",
-			"status": "02",
-			"playType": "Ut",
-			"type": "01"
-		},
-		{
-			"id": "70",
-			"name": "瑙i鏂囩‘鍥㈢鐓�",
-			"status": "02",
-			"playType": "nisi nostrud",
-			"type": "02"
-		},
-		{
-			"id": "13",
-			"name": "鍥犲眬鍛�",
-			"status": "01",
-			"playType": "ex labore esse",
-			"type": "01"
-		}
-	]
+	// videoList = [{
+	// 		"id": "45",
+	// 		"name": "涓滃浘涔犲",
+	// 		"status": "01",
+	// 		"playType": "id ea",
+	// 		"type": "02"
+	// 	},
+	// 	{
+	// 		"id": "52",
+	// 		"name": "鑰佸嚭浜蹭簨鍏�",
+	// 		"status": "02",
+	// 		"playType": "Ut",
+	// 		"type": "01"
+	// 	},
+	// 	{
+	// 		"id": "70",
+	// 		"name": "瑙i鏂囩‘鍥㈢鐓�",
+	// 		"status": "02",
+	// 		"playType": "nisi nostrud",
+	// 		"type": "02"
+	// 	},
+	// 	{
+	// 		"id": "13",
+	// 		"name": "鍥犲眬鍛�",
+	// 		"status": "01",
+	// 		"playType": "ex labore esse",
+	// 		"type": "01"
+	// 	}
+	// ]
 }
 
 //娓叉煋瑙嗛鐩戞帶璁惧
@@ -111,7 +111,7 @@
 					item.name + ' (鏋満)</div></div>';
 
 			}else if (item.type == '02') {
-				html +=					'<div class="left"><div class="icon"><img src="images/icons/g-i13.png" alt=""></div><div class="name">' +
+				html +=	'<div class="left"><div class="icon"><img src="images/icons/g-i13.png" alt=""></div><div class="name">' +
 					item.name + ' (鐞冩満)</div></div>';
 					
 			}
@@ -140,11 +140,13 @@
 		success: function(result) {
 			if (result.code == "0000") {
 				playData = result.data;
-				console.log(JSON.stringify(playData))
-				toVideo(playData.playAddr);
-			} else {
+				// toVideo(playData.playAddr);
 				// toVideo("http://player.alicdn.com/video/aliyunmedia.mp4");
-				toVideo('')
+				toVideo("http://192.168.1.62:8889/zlm/rtp/gb_play_41010200492000000001_34020000001310000001.flv");
+				
+			} else {
+				toVideo("http://192.168.1.62:8889/zlm/rtp/gb_play_41010200492000000001_34020000001310000001.flv");
+				// toVideo('')
 				mui.alert(result.msg, '鎻愮ず', ["纭畾"], function() {}, "div");
 			}
 		},
@@ -155,15 +157,23 @@
 	})
 }
 
+// function toVideo(playAddr) {
+// 	var html = '';
+// 	html += '<video id="mainvideo" src="' + playAddr +
+// 		'" poster="images/pos1.png" class="video" webkit-playsinline="true" playsinline="true" autoplay controls></video>'
+// 	$("#toVideo").html(html);
+// }
 function toVideo(playAddr) {
-	var html = '';
-	html += '<video src="' + playAddr +
-		'" poster="images/pos1.png" class="video" webkit-playsinline="true" playsinline="true" controls></video>'
-	$("#toVideo").html(html);
-}
+	var html = "";
+	//鍏抽棴杞湀绛夊緟妗�
+	html = '<easy-player id="easyPlayer" video-url="' + playAddr +
+		'" live="true" show-custom-button="true" auto-play="true" muted="true"></easy-player>';
+	$('#toVideo').html(html);
+} 
+
 
 mui('.mui-scroll-wrapper').scroll({
-	indicators: false, //鏄惁鏄剧ず婊氬姩鏉�
+	indicators: true, //鏄惁鏄剧ず婊氬姩鏉�
 	deceleration: 0.0006, //闃诲凹绯绘暟,绯绘暟瓒婂皬婊戝姩瓒婄伒鏁�
 	bounce: false, //鏄惁鍚敤鍥炲脊
 	deceleration: 0.0005 //flick 鍑忛�熺郴鏁帮紝绯绘暟瓒婂ぇ锛屾粴鍔ㄩ�熷害瓒婃參锛屾粴鍔ㄨ窛绂昏秺灏忥紝榛樿鍊�0.0006

--
Gitblit v1.9.3