mirror of
https://github.com/koush/scrypted.git
synced 2026-07-09 08:30:39 +01:00
sdl: publish
This commit is contained in:
@@ -193,7 +193,8 @@ export interface Notifier {
|
||||
* MediaObject is an intermediate object within Scrypted to represent all media objects. Plugins should use the MediaConverter to convert the Scrypted MediaObject into a desired type, whether it is a externally accessible URL, a Buffer, etc.
|
||||
*/
|
||||
export interface MediaObject {
|
||||
mimeType?: string;
|
||||
mimeType: string;
|
||||
console?: Console;
|
||||
}
|
||||
/**
|
||||
* StartStop represents a device that can be started, stopped, and possibly paused and resumed. Typically vacuum cleaners or washers.
|
||||
@@ -907,6 +908,14 @@ export interface OauthClient {
|
||||
onOauthCallback(callbackUrl: string): Promise<void>;
|
||||
|
||||
}
|
||||
|
||||
export interface MediaObjectOptions {
|
||||
/**
|
||||
* The default console to be used when logging usage of the MediaObject.
|
||||
*/
|
||||
console?: Console;
|
||||
}
|
||||
|
||||
export interface MediaManager {
|
||||
/**
|
||||
* Additional plugin provided convertors to consider for use when converting MediaObjects.
|
||||
@@ -944,21 +953,21 @@ export interface MediaManager {
|
||||
convertMediaObjectToUrl(mediaObject: string | MediaObject, toMimeType: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject. The media will be created from the provided FFmpeg input arguments.
|
||||
* Create a MediaObject from FFMpeg input arguments.
|
||||
*/
|
||||
createFFmpegMediaObject(ffmpegInput: FFMpegInput): Promise<MediaObject>;
|
||||
createFFmpegMediaObject(ffmpegInput: FFMpegInput, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject from an URL. The mime type will be determined dynamically while resolving the url.
|
||||
*/
|
||||
createMediaObjectFromUrl(data: string, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject.
|
||||
* If the data is a buffer, JSON object, or primitive type, it will be serialized.
|
||||
* All other objects will be objects will become RPC objects.
|
||||
*/
|
||||
createMediaObject(data: any | Buffer, mimeType: string): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject from an URL. The mime type should be provided, but it may be inferred from the URL path.
|
||||
*/
|
||||
createMediaObjectFromUrl(data: string, mimeType?: string): Promise<MediaObject>;
|
||||
createMediaObject(data: any | Buffer, mimeType: string, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Get the path to ffmpeg on the host system.
|
||||
|
||||
4
sdk/package-lock.json
generated
4
sdk/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/sdk",
|
||||
"version": "0.0.186",
|
||||
"version": "0.0.187",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/sdk",
|
||||
"version": "0.0.186",
|
||||
"version": "0.0.187",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/sdk",
|
||||
"version": "0.0.186",
|
||||
"version": "0.0.187",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -304,6 +304,10 @@ class HumiditySettingStatus(TypedDict):
|
||||
class Logger(TypedDict):
|
||||
pass
|
||||
|
||||
class MediaObjectOptions(TypedDict):
|
||||
console: Console
|
||||
pass
|
||||
|
||||
class MediaPlayerOptions(TypedDict):
|
||||
autoplay: bool
|
||||
mimeType: str
|
||||
@@ -980,11 +984,11 @@ class MediaManager:
|
||||
pass
|
||||
async def convertMediaObjectToUrl(self, mediaObject: str | MediaObject, toMimeType: str) -> str:
|
||||
pass
|
||||
async def createFFmpegMediaObject(self, ffmpegInput: FFMpegInput) -> MediaObject:
|
||||
async def createFFmpegMediaObject(self, ffmpegInput: FFMpegInput, options: MediaObjectOptions = None) -> MediaObject:
|
||||
pass
|
||||
async def createMediaObject(self, data: Any, mimeType: str) -> MediaObject:
|
||||
async def createMediaObject(self, data: Any, mimeType: str, options: MediaObjectOptions = None) -> MediaObject:
|
||||
pass
|
||||
async def createMediaObjectFromUrl(self, data: str, mimeType: str = None) -> MediaObject:
|
||||
async def createMediaObjectFromUrl(self, data: str, options: MediaObjectOptions = None) -> MediaObject:
|
||||
pass
|
||||
async def getFFmpegPath(self) -> str:
|
||||
pass
|
||||
|
||||
23
sdk/types/index.d.ts
vendored
23
sdk/types/index.d.ts
vendored
@@ -337,7 +337,8 @@ export interface Notifier {
|
||||
* MediaObject is an intermediate object within Scrypted to represent all media objects. Plugins should use the MediaConverter to convert the Scrypted MediaObject into a desired type, whether it is a externally accessible URL, a Buffer, etc.
|
||||
*/
|
||||
export interface MediaObject {
|
||||
mimeType?: string;
|
||||
mimeType: string;
|
||||
console?: Console;
|
||||
}
|
||||
/**
|
||||
* StartStop represents a device that can be started, stopped, and possibly paused and resumed. Typically vacuum cleaners or washers.
|
||||
@@ -991,6 +992,12 @@ export interface OauthClient {
|
||||
*/
|
||||
onOauthCallback(callbackUrl: string): Promise<void>;
|
||||
}
|
||||
export interface MediaObjectOptions {
|
||||
/**
|
||||
* The default console to be used when logging usage of the MediaObject.
|
||||
*/
|
||||
console?: Console;
|
||||
}
|
||||
export interface MediaManager {
|
||||
/**
|
||||
* Additional plugin provided convertors to consider for use when converting MediaObjects.
|
||||
@@ -1021,19 +1028,19 @@ export interface MediaManager {
|
||||
*/
|
||||
convertMediaObjectToUrl(mediaObject: string | MediaObject, toMimeType: string): Promise<string>;
|
||||
/**
|
||||
* Create a MediaObject. The media will be created from the provided FFmpeg input arguments.
|
||||
* Create a MediaObject from FFMpeg input arguments.
|
||||
*/
|
||||
createFFmpegMediaObject(ffmpegInput: FFMpegInput): Promise<MediaObject>;
|
||||
createFFmpegMediaObject(ffmpegInput: FFMpegInput, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
/**
|
||||
* Create a MediaObject from an URL. The mime type will be determined dynamically while resolving the url.
|
||||
*/
|
||||
createMediaObjectFromUrl(data: string, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
/**
|
||||
* Create a MediaObject.
|
||||
* If the data is a buffer, JSON object, or primitive type, it will be serialized.
|
||||
* All other objects will be objects will become RPC objects.
|
||||
*/
|
||||
createMediaObject(data: any | Buffer, mimeType: string): Promise<MediaObject>;
|
||||
/**
|
||||
* Create a MediaObject from an URL. The mime type should be provided, but it may be inferred from the URL path.
|
||||
*/
|
||||
createMediaObjectFromUrl(data: string, mimeType?: string): Promise<MediaObject>;
|
||||
createMediaObject(data: any | Buffer, mimeType: string, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
/**
|
||||
* Get the path to ffmpeg on the host system.
|
||||
*/
|
||||
|
||||
@@ -894,7 +894,8 @@ export interface Notifier {
|
||||
* MediaObject is an intermediate object within Scrypted to represent all media objects. Plugins should use the MediaConverter to convert the Scrypted MediaObject into a desired type, whether it is a externally accessible URL, a Buffer, etc.
|
||||
*/
|
||||
export interface MediaObject {
|
||||
mimeType?: string;
|
||||
mimeType: string;
|
||||
console?: Console;
|
||||
}
|
||||
/**
|
||||
* StartStop represents a device that can be started, stopped, and possibly paused and resumed. Typically vacuum cleaners or washers.
|
||||
@@ -1608,6 +1609,14 @@ export interface OauthClient {
|
||||
onOauthCallback(callbackUrl: string): Promise<void>;
|
||||
|
||||
}
|
||||
|
||||
export interface MediaObjectOptions {
|
||||
/**
|
||||
* The default console to be used when logging usage of the MediaObject.
|
||||
*/
|
||||
console?: Console;
|
||||
}
|
||||
|
||||
export interface MediaManager {
|
||||
/**
|
||||
* Additional plugin provided convertors to consider for use when converting MediaObjects.
|
||||
@@ -1645,21 +1654,21 @@ export interface MediaManager {
|
||||
convertMediaObjectToUrl(mediaObject: string | MediaObject, toMimeType: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject. The media will be created from the provided FFmpeg input arguments.
|
||||
* Create a MediaObject from FFMpeg input arguments.
|
||||
*/
|
||||
createFFmpegMediaObject(ffmpegInput: FFMpegInput): Promise<MediaObject>;
|
||||
createFFmpegMediaObject(ffmpegInput: FFMpegInput, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject from an URL. The mime type will be determined dynamically while resolving the url.
|
||||
*/
|
||||
createMediaObjectFromUrl(data: string, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject.
|
||||
* If the data is a buffer, JSON object, or primitive type, it will be serialized.
|
||||
* All other objects will be objects will become RPC objects.
|
||||
*/
|
||||
createMediaObject(data: any | Buffer, mimeType: string): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Create a MediaObject from an URL. The mime type should be provided, but it may be inferred from the URL path.
|
||||
*/
|
||||
createMediaObjectFromUrl(data: string, mimeType?: string): Promise<MediaObject>;
|
||||
createMediaObject(data: any | Buffer, mimeType: string, options?: MediaObjectOptions): Promise<MediaObject>;
|
||||
|
||||
/**
|
||||
* Get the path to ffmpeg on the host system.
|
||||
|
||||
4
sdk/types/package-lock.json
generated
4
sdk/types/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/types",
|
||||
"version": "0.0.28",
|
||||
"version": "0.0.29",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/types",
|
||||
"version": "0.0.28",
|
||||
"version": "0.0.29",
|
||||
"license": "ISC",
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/types",
|
||||
"version": "0.0.28",
|
||||
"version": "0.0.29",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"author": "",
|
||||
|
||||
@@ -304,6 +304,10 @@ class HumiditySettingStatus(TypedDict):
|
||||
class Logger(TypedDict):
|
||||
pass
|
||||
|
||||
class MediaObjectOptions(TypedDict):
|
||||
console: Console
|
||||
pass
|
||||
|
||||
class MediaPlayerOptions(TypedDict):
|
||||
autoplay: bool
|
||||
mimeType: str
|
||||
@@ -980,11 +984,11 @@ class MediaManager:
|
||||
pass
|
||||
async def convertMediaObjectToUrl(self, mediaObject: str | MediaObject, toMimeType: str) -> str:
|
||||
pass
|
||||
async def createFFmpegMediaObject(self, ffmpegInput: FFMpegInput) -> MediaObject:
|
||||
async def createFFmpegMediaObject(self, ffmpegInput: FFMpegInput, options: MediaObjectOptions = None) -> MediaObject:
|
||||
pass
|
||||
async def createMediaObject(self, data: Any, mimeType: str) -> MediaObject:
|
||||
async def createMediaObject(self, data: Any, mimeType: str, options: MediaObjectOptions = None) -> MediaObject:
|
||||
pass
|
||||
async def createMediaObjectFromUrl(self, data: str, mimeType: str = None) -> MediaObject:
|
||||
async def createMediaObjectFromUrl(self, data: str, options: MediaObjectOptions = None) -> MediaObject:
|
||||
pass
|
||||
async def getFFmpegPath(self) -> str:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user