Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bce-sdk-js

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bce-sdk-js - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

cdn.js

2

package.json
{
"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 @@ *

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc