|
@@ -138,24 +138,28 @@ public class CameraUtil {
|
|
|
* @param channel 相机通道
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String getPlayFlv(String cameraCode, String channel, boolean flay) {
|
|
|
-// if (!flay) {
|
|
|
-// return bakUrl + "/hdl/" + channel + "/" + cameraCode + ".flv";
|
|
|
-// }
|
|
|
-// return webUrl + "/hdl/" + channel + "/" + cameraCode + ".flv";
|
|
|
-
|
|
|
+ public static String getPlayFlv(String cameraCode, String channel, boolean flay, String format) {
|
|
|
|
|
|
+ if (!ObjectUtils.isEmpty(format) && "HTTP-FLV".equals(format)) {
|
|
|
+ if (!flay) {
|
|
|
+ return bakUrl + "/hdl/" + channel + "/" + cameraCode + ".flv";
|
|
|
+ }
|
|
|
+ return webUrl + "/hdl/" + channel + "/" + cameraCode + ".flv";
|
|
|
+ }
|
|
|
return bakUrl + "/ws/" + channel + "/" + cameraCode + ".flv";
|
|
|
+ }
|
|
|
|
|
|
+ public static String getPlayFlv(String cameraCode, String channel, String format) {
|
|
|
+ return getPlayFlv(cameraCode, channel, true, format);
|
|
|
+ }
|
|
|
|
|
|
-// if (!flay) {
|
|
|
-// return bakUrl + "/ws/" + channel + "/" + cameraCode + ".flv";
|
|
|
-// }
|
|
|
-// return webUrl + "/ws/" + channel + "/" + cameraCode + ".flv";
|
|
|
+ public static String getPlayFlv(String cameraCode, String channel, boolean flay) {
|
|
|
+ return getPlayFlv(cameraCode, channel, flay, "WS-FLV");
|
|
|
}
|
|
|
|
|
|
public static String getPlayFlv(String cameraCode, String channel) {
|
|
|
- return getPlayFlv(cameraCode, channel, true);
|
|
|
+ // WS-FLV HTTP-FLV
|
|
|
+ return getPlayFlv(cameraCode, channel, true, "HTTP-FLV");
|
|
|
}
|
|
|
|
|
|
/**
|