Skip to content

Commit

Permalink
Update Main.java
Browse files Browse the repository at this point in the history
  • Loading branch information
WMSPanel authored May 4, 2018
1 parent 62a3a2d commit 6e35f6f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions java/src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ public static void main(String[] args) throws UnsupportedEncodingException {
DateTimeFormatter timeFormatter = DateTimeFormat.forPattern("M/d/y h:m:s a").withZone(DateTimeZone.UTC).withLocale(Locale.US);
DateTime currentServerTime = new DateTime(DateTimeZone.UTC); // lets get localtime in UTC timezone
String today = timeFormatter.print(currentServerTime);
String initial_url = "http://yourdomain.com:8081/live";
String video_url = "/Stream1";
String ip = "127.0.0.1";
String video_url = "http://yourdomain.com:8081/live/Stream1";
String ip = "127.0.0.1";
String key = "defaultpassword";
String validminutes = "20";

Expand All @@ -25,7 +24,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {
String base64hash = Base64.encodeBase64String(DigestUtils.md5(ascii_to_hash));
String urlsignature = "server_time=" + today + "&hash_value=" + base64hash + "&validminutes=" + validminutes;
String base64urlsignature = Base64.encodeBase64String(urlsignature.getBytes("UTF-8"));
String signedurlwithvalidinterval = initial_url + "?wmsAuthSign=" + base64urlsignature + video_url;
String signedurlwithvalidinterval = video_url + "?wmsAuthSign=" + base64urlsignature;

return;
}
Expand Down

0 comments on commit 6e35f6f

Please sign in to comment.