@uppy/audio
Advanced tools
Comparing version 2.0.0-beta.5 to 2.0.0-beta.6
# @uppy/audio | ||
## 2.0.0-beta.6 | ||
Released: 2024-06-04 | ||
Included in: Uppy v4.0.0-beta.10 | ||
- @uppy/audio: remove unused component props (Antoine du Hamel / #5209) | ||
- @uppy/audio: move internal property to private field (Antoine du Hamel / #5207) | ||
## 2.0.0-beta.5 | ||
@@ -4,0 +12,0 @@ |
@@ -1,4 +0,4 @@ | ||
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } | ||
function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); return e; } | ||
var id = 0; | ||
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } | ||
function _classPrivateFieldLooseKey(e) { return "__private_" + id++ + "_" + e; } | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
@@ -5,0 +5,0 @@ function isFunction(v) { |
@@ -11,6 +11,7 @@ import { h } from 'preact'; | ||
recordingLengthSeconds: number; | ||
recordedAudio: string | null | undefined; | ||
hasAudio: boolean; | ||
cameraError: null; | ||
audioSources: MediaDeviceInfo[]; | ||
currentDeviceId?: null | string | MediaStreamTrack; | ||
currentDeviceId: string | MediaStreamTrack | null | undefined; | ||
isRecording: boolean; | ||
@@ -26,3 +27,2 @@ showAudioSourceDropdown: boolean; | ||
static VERSION: any; | ||
private recordingLengthTimer; | ||
private icon; | ||
@@ -29,0 +29,0 @@ constructor(uppy: Uppy<M, B>, opts?: AudioOptions); |
@@ -1,5 +0,5 @@ | ||
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); } | ||
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); return e; } | ||
var id = 0; | ||
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } | ||
function _classPrivateFieldLooseKey(e) { return "__private_" + id++ + "_" + e; } | ||
import { h } from 'preact'; | ||
@@ -15,4 +15,5 @@ import { UIPlugin } from '@uppy/core'; | ||
const packageJson = { | ||
"version": "2.0.0-beta.5" | ||
"version": "2.0.0-beta.6" | ||
}; | ||
var _recordingLengthTimer = /*#__PURE__*/_classPrivateFieldLooseKey("recordingLengthTimer"); | ||
var _stream = /*#__PURE__*/_classPrivateFieldLooseKey("stream"); | ||
@@ -47,2 +48,6 @@ var _audioActive = /*#__PURE__*/_classPrivateFieldLooseKey("audioActive"); | ||
}); | ||
Object.defineProperty(this, _recordingLengthTimer, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
Object.defineProperty(this, _stream, { | ||
@@ -152,4 +157,3 @@ writable: true, | ||
// Start the recordingLengthTimer if we are showing the recording length. | ||
// TODO: switch this to a private field | ||
this.recordingLengthTimer = setInterval(() => { | ||
_classPrivateFieldLooseBase(this, _recordingLengthTimer)[_recordingLengthTimer] = setInterval(() => { | ||
const currentRecordingLength = this.getPluginState().recordingLengthSeconds; | ||
@@ -173,3 +177,3 @@ this.setPluginState({ | ||
_classPrivateFieldLooseBase(this, _recorder)[_recorder].stop(); | ||
clearInterval(this.recordingLengthTimer); | ||
clearInterval(_classPrivateFieldLooseBase(this, _recordingLengthTimer)[_recordingLengthTimer]); | ||
this.setPluginState({ | ||
@@ -244,3 +248,3 @@ recordingLengthSeconds: 0 | ||
_classPrivateFieldLooseBase(this, _recorder)[_recorder].stop(); | ||
clearInterval(this.recordingLengthTimer); | ||
clearInterval(_classPrivateFieldLooseBase(this, _recordingLengthTimer)[_recordingLengthTimer]); | ||
}); | ||
@@ -324,5 +328,2 @@ } | ||
, _extends({}, audioState, { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore TODO: remove unused | ||
audioActive: _classPrivateFieldLooseBase(this, _audioActive)[_audioActive], | ||
onChangeSource: _classPrivateFieldLooseBase(this, _changeSource)[_changeSource], | ||
@@ -329,0 +330,0 @@ onStartRecording: _classPrivateFieldLooseBase(this, _startRecording)[_startRecording], |
import { h } from 'preact'; | ||
export interface AudioSourceSelectProps { | ||
currentDeviceId: string; | ||
currentDeviceId: string | MediaStreamTrack | null | undefined; | ||
audioSources: MediaDeviceInfo[]; | ||
@@ -5,0 +5,0 @@ onChangeSource: (value: string) => void; |
@@ -6,3 +6,3 @@ import { h } from 'preact'; | ||
stream: MediaStream | null | undefined; | ||
recordedAudio: string; | ||
recordedAudio: string | null | undefined; | ||
recording: boolean; | ||
@@ -9,0 +9,0 @@ supportsRecording: boolean; |
{ | ||
"name": "@uppy/audio", | ||
"description": "Uppy plugin that records audio using the device’s microphone.", | ||
"version": "2.0.0-beta.5", | ||
"version": "2.0.0-beta.6", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^6.0.0-beta.5", | ||
"@uppy/utils": "^6.0.0-beta.8", | ||
"preact": "^10.5.13" | ||
@@ -36,3 +36,3 @@ }, | ||
"peerDependencies": { | ||
"@uppy/core": "^4.0.0-beta.5" | ||
"@uppy/core": "^4.0.0-beta.9" | ||
}, | ||
@@ -39,0 +39,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
146170
1986
Updated@uppy/utils@^6.0.0-beta.8