bce-sdk-js
Advanced tools
Comparing version 0.2.5 to 0.2.6
{ | ||
"name": "bce-sdk-js", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Baidu Cloud Engine JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -102,2 +102,6 @@ /** | ||
VodClient.prototype.getDownloadUrl = function (mediaId, expiredInSeconds) { | ||
return new Media(this.config).getDownloadUrl(mediaId, expiredInSeconds); | ||
}; | ||
VodClient.prototype.getPlayerCode = function (mediaId, width, height, autoStart, options) { | ||
@@ -104,0 +108,0 @@ return new Player(this.config).setMediaId(mediaId).code(u.extend({ |
@@ -161,2 +161,21 @@ /** | ||
/** | ||
* 获取音视频媒资的源文件下载地址 | ||
* | ||
* @param {string?} opt_mediaId 媒资Id. | ||
* @param {number?} opt_expiredInSeconds 过期时间,单位(s) | ||
* | ||
* @return {Promise.<Object>} | ||
*/ | ||
Media.prototype.getDownloadUrl = function (opt_mediaId, opt_expiredInSeconds) { | ||
var expiredInSeconds = opt_expiredInSeconds || 60 * 60 * 24; // 默认1天 | ||
var url = this._buildUrl(opt_mediaId || this._mediaId); | ||
return this.sendRequest('GET', url, { | ||
params: { | ||
sourcedownload: '', | ||
expiredInSeconds: expiredInSeconds | ||
} | ||
}); | ||
}; | ||
/** | ||
* 更新指定媒资 | ||
@@ -163,0 +182,0 @@ * |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 17 instances in 1 package
11522547
149
36062
62