From 0352ad2d639cf52986e0638015084d7f020ec3ca Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 13 十一月 2020 09:50:37 +0800
Subject: [PATCH] Merge pull request #12 from lawrencehj/master

---
 src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
index 780e950..feb96df 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
@@ -42,6 +42,7 @@
 	public ResponseEntity<String> play(@PathVariable String deviceId, @PathVariable String channelId,
 	Integer getEncoding) {
 
+		if (getEncoding == null) getEncoding = 0;
 		Device device = storager.queryVideoDevice(deviceId);
 		StreamInfo streamInfo = storager.queryPlayByDevice(deviceId, channelId);
 
@@ -103,7 +104,7 @@
 				}
 			}
 		} else {
-			String flv = storager.getMediaInfo().getLocalIP() + ":" + storager.getMediaInfo().getHttpPort() + "/rtp/"
+			String flv = storager.getMediaInfo().getWanIp() + ":" + storager.getMediaInfo().getHttpPort() + "/rtp/"
 					+ streamId + ".flv";
 			streamInfo.setFlv("http://" + flv);
 			streamInfo.setWs_flv("ws://" + flv);
@@ -146,3 +147,4 @@
 		}
 	}
 }
+

--
Gitblit v1.8.0