sdk: update

This commit is contained in:
Koushik Dutta
2022-02-13 11:22:13 -08:00
parent 98603cb1cb
commit 810e5672f8
9 changed files with 67 additions and 723 deletions

View File

@@ -370,7 +370,15 @@ export interface MediaStreamOptions {
* Prebuffer time in milliseconds.
*/
prebuffer?: number;
/**
* The container type of this stream, ie: mp4, mpegts, rtsp.
*/
container?: string;
/**
* The tool used to generate the container. Ie, scrypted,
* the ffmpeg tools, gstreamer.
*/
tool?: string;
video?: VideoStreamOptions;
audio?: AudioStreamOptions;

696
sdk/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
{
"name": "@scrypted/sdk",
"version": "0.0.167",
"version": "0.0.168",
"description": "",
"main": "index.js",
"scripts": {
"prepublishOnly": "npm run build",
"prebuild": "typedoc && ts-node gen/build",
"prebuild": "typedoc && ts-node gen/build && cd types && npm run build",
"build": "tsc",
"webpack": "webpack-cli --config webpack.config.js",
"test": "echo \"Error: no test specified\" && exit 1"
@@ -21,13 +21,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
"@babel/plugin-proposal-numeric-separator": "^7.14.5",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-transform-modules-commonjs": "^7.15.4",
"@babel/plugin-transform-typescript": "^7.15.8",
"@babel/preset-typescript": "^7.15.0",
"@babel/preset-typescript": "^7.16.7",
"adm-zip": "^0.4.13",
"axios": "^0.21.4",
"babel-loader": "^8.2.3",
@@ -37,7 +31,6 @@
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"tmp": "^0.2.1",
"ts-loader": "^9.2.6",
"webpack": "^5.59.0"
},
"devDependencies": {

View File

@@ -179,6 +179,7 @@ class ResponseMediaStreamOptions(TypedDict):
prebuffer: float
refreshAt: float
source: MediaStreamSource
tool: str
userConfigurable: bool
video: VideoStreamOptions
pass
@@ -331,6 +332,7 @@ class MediaStreamOptions(TypedDict):
name: str
prebuffer: float
source: MediaStreamSource
tool: str
userConfigurable: bool
video: VideoStreamOptions
pass
@@ -384,6 +386,7 @@ class RequestMediaStreamOptions(TypedDict):
refresh: bool
refreshAt: float
source: MediaStreamSource
tool: str
userConfigurable: bool
video: VideoStreamOptions
pass

View File

@@ -497,7 +497,15 @@ export interface MediaStreamOptions {
* Prebuffer time in milliseconds.
*/
prebuffer?: number;
/**
* The container type of this stream, ie: mp4, mpegts, rtsp.
*/
container?: string;
/**
* The tool used to generate the container. Ie, scrypted,
* the ffmpeg tools, gstreamer.
*/
tool?: string;
video?: VideoStreamOptions;
audio?: AudioStreamOptions;
/**

View File

@@ -1019,7 +1019,15 @@ export interface MediaStreamOptions {
* Prebuffer time in milliseconds.
*/
prebuffer?: number;
/**
* The container type of this stream, ie: mp4, mpegts, rtsp.
*/
container?: string;
/**
* The tool used to generate the container. Ie, scrypted,
* the ffmpeg tools, gstreamer.
*/
tool?: string;
video?: VideoStreamOptions;
audio?: AudioStreamOptions;

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/types",
"version": "0.0.6",
"version": "0.0.7",
"description": "",
"main": "index.js",
"author": "",

View File

@@ -179,6 +179,7 @@ class ResponseMediaStreamOptions(TypedDict):
prebuffer: float
refreshAt: float
source: MediaStreamSource
tool: str
userConfigurable: bool
video: VideoStreamOptions
pass
@@ -331,6 +332,7 @@ class MediaStreamOptions(TypedDict):
name: str
prebuffer: float
source: MediaStreamSource
tool: str
userConfigurable: bool
video: VideoStreamOptions
pass
@@ -384,6 +386,7 @@ class RequestMediaStreamOptions(TypedDict):
refresh: bool
refreshAt: float
source: MediaStreamSource
tool: str
userConfigurable: bool
video: VideoStreamOptions
pass

View File

@@ -30,6 +30,20 @@ function ensureAlias(name) {
return sanitizedPath;
}
const plugins = [
new webpack.DefinePlugin({
'process.env.SSDP_COV': false,
}),
];
if (process.env.WEBPACK_ANALYZER) {
plugins.push(
new BundleAnalyzerPlugin({
generateStatsFile: true,
}),
);
}
const alias = {};
const polyfills = [
'adm-zip',
@@ -65,36 +79,16 @@ module.exports = {
rules: [
{
test: /\.(ts|js)x?$/,
// unsure if this is correct... need to transpile node modules at times.
// exclude: /(core-js|node_modules|bower_components)/,
exclude: /(core-js)/,
use: {
loader: 'babel-loader',
options: {
"plugins": [
"@babel/plugin-transform-modules-commonjs",
"babel-plugin-const-enum",
"@babel/plugin-transform-typescript",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-numeric-separator",
],
"presets": [
"@babel/preset-typescript",
]
}
}
},
// {
// test: /\.tsx?$/,
// loader: 'ts-loader',
// exclude: /node_modules/,
// options: {
// configFile : path.join(__dirname, 'tsconfig.plugin.json'),
// },
// }
]
},
@@ -116,23 +110,12 @@ module.exports = {
colors: true
},
plugins: [
new webpack.DefinePlugin({
'process.env.SSDP_COV': false,
}),
// new BundleAnalyzerPlugin({
// generateStatsFile: true
// }),
],
plugins,
optimization: {
minimize: isProduction,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
}
}),
new TerserPlugin(),
],
},