Skip to content

Commit

Permalink
Merge pull request #235 from longbai/fixed_pili_streaming_expire
Browse files Browse the repository at this point in the history
fixed streaming expired
  • Loading branch information
longbai authored Nov 3, 2016
2 parents 1a19c5d + f51350d commit f961b7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#Changelog

## 7.2.1 (2016-11-03)
### 修正
* streaming publish url 过期时间单位问题

## 7.2.0 (2016-11-02)
### 增加
* 为多存储区 增加 autozone, zone2
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/qiniu/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public final class Constants {
/**
* 版本号
*/
public static final String VERSION = "7.2.0";
public static final String VERSION = "7.2.1";
/**
* 块大小,不能改变
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/qiniu/streaming/UrlFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import com.qiniu.util.Auth;

import java.util.Date;

/**
* Created by bailong on 16/9/22.
*/
Expand Down Expand Up @@ -37,7 +35,7 @@ public String rtmpPublishUrl(String streamKey) {
}

public String rtmpPublishUrl(String streamKey, int expireAfterSeconds) {
long expire = new Date().getTime() + expireAfterSeconds;
long expire = System.currentTimeMillis() / 1000 + expireAfterSeconds;
String path = String.format("/%s/%s?e=%d", hub, streamKey, expire);
String token;
try {
Expand Down

0 comments on commit f961b7a

Please sign in to comment.