@uppy/screen-capture
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -8,3 +8,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
const packageJson = { | ||
"version": "3.1.2" | ||
"version": "3.1.3" | ||
}; | ||
@@ -11,0 +11,0 @@ import locale from './locale.js'; |
{ | ||
"name": "@uppy/screen-capture", | ||
"description": "Uppy plugin that captures video from display or application.", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"license": "MIT", | ||
@@ -28,7 +28,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^5.4.3", | ||
"@uppy/utils": "^5.5.2", | ||
"preact": "^10.5.13" | ||
}, | ||
"peerDependencies": { | ||
"@uppy/core": "^3.4.0" | ||
"@uppy/core": "^3.6.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "publishConfig": { |
import type { PluginTarget, UIPlugin, UIPluginOptions } from '@uppy/core' | ||
// https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#Properties_of_shared_screen_tracks | ||
// TODO: use the global DisplayMediaStreamConstraints once typescript includes it by default | ||
interface DisplayMediaStreamConstraints { | ||
audio?: boolean | MediaTrackConstraints; | ||
video?: boolean | (MediaTrackConstraints & { | ||
cursor?: 'always' | 'motion' | 'never', | ||
displaySurface?: 'application' | 'browser' | 'monitor' | 'window', | ||
logicalSurface?: boolean | ||
}); | ||
} | ||
// https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#Properties_of_shared_screen_tracks | ||
// TODO: use the global DisplayMediaStreamConstraints once typescript includes it by default | ||
interface DisplayMediaStreamConstraints { | ||
audio?: boolean | MediaTrackConstraints | ||
video?: | ||
| boolean | ||
| (MediaTrackConstraints & { | ||
cursor?: 'always' | 'motion' | 'never' | ||
displaySurface?: 'application' | 'browser' | 'monitor' | 'window' | ||
logicalSurface?: boolean | ||
}) | ||
} | ||
export interface ScreenCaptureOptions extends UIPluginOptions { | ||
target?: PluginTarget | ||
displayMediaConstraints?: DisplayMediaStreamConstraints, | ||
userMediaConstraints?: MediaStreamConstraints, | ||
preferredVideoMimeType?: string | ||
} | ||
target?: PluginTarget | ||
displayMediaConstraints?: DisplayMediaStreamConstraints | ||
userMediaConstraints?: MediaStreamConstraints | ||
preferredVideoMimeType?: string | ||
} | ||
@@ -21,0 +23,0 @@ declare class ScreenCapture extends UIPlugin<ScreenCaptureOptions> {} |
@@ -15,6 +15,8 @@ import { expectError } from 'tsd' | ||
}) | ||
expectError(new Uppy().use(ScreenCapture, { | ||
displayMediaConstraints: { | ||
video: { displaySurface: 'some nonsense' }, | ||
}, | ||
})) | ||
expectError( | ||
new Uppy().use(ScreenCapture, { | ||
displayMediaConstraints: { | ||
video: { displaySurface: 'some nonsense' }, | ||
}, | ||
}), | ||
) |
Sorry, the diff of this file is not supported yet
96612
1457
Updated@uppy/utils@^5.5.2