@uppy/screen-capture
Advanced tools
Comparing version 1.0.16 to 1.0.17
function _extends() { _extends = Object.assign || 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 _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var _require = require('preact'), | ||
@@ -59,5 +61,5 @@ h = _require.h, | ||
return h("div", { | ||
class: "uppy uppy-ScreenCapture-container" | ||
className: "uppy uppy-ScreenCapture-container" | ||
}, h("div", { | ||
class: "uppy-ScreenCapture-videoContainer" | ||
className: "uppy-ScreenCapture-videoContainer" | ||
}, h(StreamStatus, this.props), h("video", _extends({ | ||
@@ -67,5 +69,5 @@ ref: function ref(videoElement) { | ||
}, | ||
class: "uppy-ScreenCapture-video" | ||
className: "uppy-ScreenCapture-video" | ||
}, videoProps)), h(StopWatch, this.props)), h("div", { | ||
class: "uppy-ScreenCapture-buttonContainer" | ||
className: "uppy-ScreenCapture-buttonContainer" | ||
}, h(RecordButton, this.props), h(SubmitButton, this.props))); | ||
@@ -72,0 +74,0 @@ }; |
@@ -7,4 +7,6 @@ var _class, _temp; | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var _require = require('preact'), | ||
@@ -431,2 +433,2 @@ h = _require.h; | ||
return ScreenCapture; | ||
}(Plugin), _class.VERSION = "1.0.16", _temp); | ||
}(Plugin), _class.VERSION = "1.0.17", _temp); |
@@ -16,7 +16,7 @@ var _require = require('preact'), | ||
return h("button", { | ||
class: "uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video uppy-ScreenCapture-button--stop-rec", | ||
className: "uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video uppy-ScreenCapture-button--stop-rec", | ||
type: "button", | ||
title: i18n('stopCapturing'), | ||
"aria-label": i18n('stopCapturing'), | ||
onclick: onStopRecording, | ||
onClick: onStopRecording, | ||
"data-uppy-super-focusable": true | ||
@@ -26,3 +26,3 @@ }, h("svg", { | ||
focusable: "false", | ||
class: "uppy-c-icon", | ||
className: "uppy-c-icon", | ||
width: "100", | ||
@@ -40,7 +40,7 @@ height: "100", | ||
return h("button", { | ||
class: "uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video", | ||
className: "uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video", | ||
type: "button", | ||
title: i18n('startCapturing'), | ||
"aria-label": i18n('startCapturing'), | ||
onclick: onStartRecording, | ||
onClick: onStartRecording, | ||
"data-uppy-super-focusable": true | ||
@@ -50,3 +50,3 @@ }, h("svg", { | ||
focusable: "false", | ||
class: "uppy-c-icon", | ||
className: "uppy-c-icon", | ||
width: "100", | ||
@@ -53,0 +53,0 @@ height: "100", |
@@ -13,5 +13,5 @@ var _require = require('preact'), | ||
fill: "none", | ||
"fill-rule": "evenodd" | ||
fillRule: "evenodd" | ||
}, h("rect", { | ||
class: "uppy-ProviderIconBg", | ||
className: "uppy-ProviderIconBg", | ||
fill: "#2C3E50", | ||
@@ -24,3 +24,3 @@ width: "32", | ||
fill: "#FFF", | ||
"fill-rule": "nonzero" | ||
fillRule: "nonzero" | ||
}), h("circle", { | ||
@@ -27,0 +27,0 @@ fill: "#FFF", |
function _extends() { _extends = Object.assign || 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 _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var _require = require('preact'), | ||
@@ -115,5 +117,5 @@ h = _require.h, | ||
}, minAndSec))); | ||
} else { | ||
return null; | ||
} | ||
return null; | ||
}; | ||
@@ -120,0 +122,0 @@ |
@@ -12,3 +12,3 @@ var _require = require('preact'), | ||
"aria-label": i18n('streamActive'), | ||
class: "uppy-ScreenCapture-icon--stream uppy-ScreenCapture-icon--streamActive" | ||
className: "uppy-ScreenCapture-icon--stream uppy-ScreenCapture-icon--streamActive" | ||
}, h("svg", { | ||
@@ -30,24 +30,24 @@ "aria-hidden": "true", | ||
}))); | ||
} else { | ||
return h("div", { | ||
title: i18n('streamPassive'), | ||
"aria-label": i18n('streamPassive'), | ||
class: "uppy-ScreenCapture-icon--stream" | ||
}, h("svg", { | ||
"aria-hidden": "true", | ||
focusable: "false", | ||
width: "24", | ||
height: "24", | ||
viewBox: "0 0 24 24" | ||
}, h("path", { | ||
d: "M0 0h24v24H0z", | ||
opacity: ".1", | ||
fill: "none" | ||
}), h("path", { | ||
d: "M0 0h24v24H0z", | ||
fill: "none" | ||
}), h("path", { | ||
d: "M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" | ||
}))); | ||
} | ||
return h("div", { | ||
title: i18n('streamPassive'), | ||
"aria-label": i18n('streamPassive'), | ||
className: "uppy-ScreenCapture-icon--stream" | ||
}, h("svg", { | ||
"aria-hidden": "true", | ||
focusable: "false", | ||
width: "24", | ||
height: "24", | ||
viewBox: "0 0 24 24" | ||
}, h("path", { | ||
d: "M0 0h24v24H0z", | ||
opacity: ".1", | ||
fill: "none" | ||
}), h("path", { | ||
d: "M0 0h24v24H0z", | ||
fill: "none" | ||
}), h("path", { | ||
d: "M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" | ||
}))); | ||
}; |
@@ -16,7 +16,7 @@ var _require = require('preact'), | ||
return h("button", { | ||
class: "uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--submit", | ||
className: "uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--submit", | ||
type: "button", | ||
title: i18n('submitRecordedFile'), | ||
"aria-label": i18n('submitRecordedFile'), | ||
onclick: onSubmit, | ||
onClick: onSubmit, | ||
"data-uppy-super-focusable": true | ||
@@ -26,3 +26,3 @@ }, h("svg", { | ||
focusable: "false", | ||
class: "uppy-c-icon", | ||
className: "uppy-c-icon", | ||
width: "48", | ||
@@ -37,5 +37,5 @@ height: "48", | ||
}))); | ||
} else { | ||
return null; | ||
} | ||
return null; | ||
}; |
{ | ||
"name": "@uppy/screen-capture", | ||
"description": "Uppy plugin that captures video from display or application.", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"license": "MIT", | ||
@@ -27,3 +27,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^3.4.2", | ||
"@uppy/utils": "^3.5.0", | ||
"preact": "8.2.9" | ||
@@ -37,3 +37,3 @@ }, | ||
}, | ||
"gitHead": "4bf107236340dc98f8584f15a06e13ffa9fc31f4" | ||
"gitHead": "6771545fe70134088a5441ef5c2f7b872e32d812" | ||
} |
@@ -16,3 +16,3 @@ const { h, Component } = require('preact') | ||
const videoProps = { | ||
playsinline: true | ||
playsinline: true, | ||
} | ||
@@ -40,10 +40,10 @@ | ||
return ( | ||
<div class="uppy uppy-ScreenCapture-container"> | ||
<div class="uppy-ScreenCapture-videoContainer"> | ||
<div className="uppy uppy-ScreenCapture-container"> | ||
<div className="uppy-ScreenCapture-videoContainer"> | ||
<StreamStatus {...this.props} /> | ||
<video ref={videoElement => (this.videoElement = videoElement)} class="uppy-ScreenCapture-video" {...videoProps} /> | ||
<video ref={videoElement => (this.videoElement = videoElement)} className="uppy-ScreenCapture-video" {...videoProps} /> | ||
<StopWatch {...this.props} /> | ||
</div> | ||
<div class="uppy-ScreenCapture-buttonContainer"> | ||
<div className="uppy-ScreenCapture-buttonContainer"> | ||
<RecordButton {...this.props} /> | ||
@@ -50,0 +50,0 @@ <SubmitButton {...this.props} /> |
@@ -47,4 +47,4 @@ const { h } = require('preact') | ||
micDisabled: 'Microphone access denied by user', | ||
recording: 'Recording' | ||
} | ||
recording: 'Recording', | ||
}, | ||
} | ||
@@ -62,13 +62,13 @@ | ||
ideal: 3, | ||
max: 5 | ||
max: 5, | ||
}, | ||
cursor: 'motion', | ||
displaySurface: 'monitor' | ||
} | ||
displaySurface: 'monitor', | ||
}, | ||
}, | ||
// https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints/audio | ||
userMediaConstraints: { | ||
audio: true | ||
audio: true, | ||
}, | ||
preferredVideoMimeType: 'video/webm' | ||
preferredVideoMimeType: 'video/webm', | ||
} | ||
@@ -111,3 +111,3 @@ | ||
streamActive: false, | ||
audioStreamActive: false | ||
audioStreamActive: false, | ||
}) | ||
@@ -170,3 +170,3 @@ | ||
this.setPluginState({ | ||
streamActive: true | ||
streamActive: true, | ||
}) | ||
@@ -178,3 +178,3 @@ | ||
this.setPluginState({ | ||
screenRecError: err | ||
screenRecError: err, | ||
}) | ||
@@ -205,3 +205,3 @@ | ||
this.setPluginState({ | ||
audioStreamActive: true | ||
audioStreamActive: true, | ||
}) | ||
@@ -260,3 +260,3 @@ | ||
this.setPluginState({ | ||
recording: true | ||
recording: true, | ||
}) | ||
@@ -289,3 +289,3 @@ }) | ||
this.setPluginState({ | ||
streamActive: false, audioStreamActive: false | ||
streamActive: false, audioStreamActive: false, | ||
}) | ||
@@ -306,3 +306,3 @@ } | ||
this.setPluginState({ | ||
recording: false | ||
recording: false, | ||
}) | ||
@@ -318,3 +318,3 @@ // get video file after recorder stopped | ||
// eslint-disable-next-line compat/compat | ||
recordedVideo: URL.createObjectURL(file.data) | ||
recordedVideo: URL.createObjectURL(file.data), | ||
}) | ||
@@ -381,3 +381,3 @@ }).then(() => { | ||
this.setPluginState({ | ||
recordedVideo: null | ||
recordedVideo: null, | ||
}) | ||
@@ -400,5 +400,5 @@ | ||
source: this.id, | ||
name: name, | ||
name, | ||
data: new Blob([blob], { type: mimeType }), | ||
type: mimeType | ||
type: mimeType, | ||
} | ||
@@ -405,0 +405,0 @@ |
@@ -10,10 +10,10 @@ const { h } = require('preact') | ||
<button | ||
class="uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video uppy-ScreenCapture-button--stop-rec" | ||
className="uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video uppy-ScreenCapture-button--stop-rec" | ||
type="button" | ||
title={i18n('stopCapturing')} | ||
aria-label={i18n('stopCapturing')} | ||
onclick={onStopRecording} | ||
onClick={onStopRecording} | ||
data-uppy-super-focusable | ||
> | ||
<svg aria-hidden="true" focusable="false" class="uppy-c-icon" width="100" height="100" viewBox="0 0 100 100"> | ||
<svg aria-hidden="true" focusable="false" className="uppy-c-icon" width="100" height="100" viewBox="0 0 100 100"> | ||
<rect x="15" y="15" width="70" height="70" /> | ||
@@ -27,10 +27,10 @@ </svg> | ||
<button | ||
class="uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video" | ||
className="uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video" | ||
type="button" | ||
title={i18n('startCapturing')} | ||
aria-label={i18n('startCapturing')} | ||
onclick={onStartRecording} | ||
onClick={onStartRecording} | ||
data-uppy-super-focusable | ||
> | ||
<svg aria-hidden="true" focusable="false" class="uppy-c-icon" width="100" height="100" viewBox="0 0 100 100"> | ||
<svg aria-hidden="true" focusable="false" className="uppy-c-icon" width="100" height="100" viewBox="0 0 100 100"> | ||
<circle cx="50" cy="50" r="40" /> | ||
@@ -37,0 +37,0 @@ </svg> |
@@ -6,5 +6,5 @@ const { h } = require('preact') | ||
<svg aria-hidden="true" focusable="false" width="32" height="32" viewBox="0 0 32 32"> | ||
<g fill="none" fill-rule="evenodd"> | ||
<rect class="uppy-ProviderIconBg" fill="#2C3E50" width="32" height="32" rx="16" /> | ||
<path d="M24.182 9H7.818C6.81 9 6 9.742 6 10.667v10c0 .916.81 1.666 1.818 1.666h4.546V24h7.272v-1.667h4.546c1 0 1.809-.75 1.809-1.666l.009-10C26 9.742 25.182 9 24.182 9zM24 21H8V11h16v10z" fill="#FFF" fill-rule="nonzero" /> | ||
<g fill="none" fillRule="evenodd"> | ||
<rect className="uppy-ProviderIconBg" fill="#2C3E50" width="32" height="32" rx="16" /> | ||
<path d="M24.182 9H7.818C6.81 9 6 9.742 6 10.667v10c0 .916.81 1.666 1.818 1.666h4.546V24h7.272v-1.667h4.546c1 0 1.809-.75 1.809-1.666l.009-10C26 9.742 25.182 9 24.182 9zM24 21H8V11h16v10z" fill="#FFF" fillRule="nonzero" /> | ||
<circle fill="#FFF" cx="16" cy="16" r="2" /> | ||
@@ -11,0 +11,0 @@ </g> |
@@ -11,3 +11,3 @@ const { h, Component } = require('preact') | ||
height: '100%', | ||
display: 'flex' | ||
display: 'flex', | ||
} | ||
@@ -20,3 +20,3 @@ | ||
background: 'black', | ||
opacity: 0.7 | ||
opacity: 0.7, | ||
} | ||
@@ -30,3 +30,3 @@ | ||
zIndex: 1, | ||
color: 'white' | ||
color: 'white', | ||
} | ||
@@ -38,3 +38,3 @@ | ||
marginBottom: '1rem', | ||
fontSize: '1.5rem' | ||
fontSize: '1.5rem', | ||
} | ||
@@ -48,3 +48,3 @@ | ||
fontSize: '3rem', | ||
fontFamily: 'Courier New' | ||
fontFamily: 'Courier New', | ||
} | ||
@@ -104,5 +104,4 @@ } | ||
) | ||
} else { | ||
return null | ||
} | ||
return null | ||
} | ||
@@ -109,0 +108,0 @@ } |
@@ -6,9 +6,20 @@ const { h } = require('preact') | ||
return ( | ||
<div title={i18n('streamActive')} aria-label={i18n('streamActive')} class="uppy-ScreenCapture-icon--stream uppy-ScreenCapture-icon--streamActive"><svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" opacity=".1" fill="none" /><path d="M0 0h24v24H0z" fill="none" /><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" /></svg></div> | ||
<div title={i18n('streamActive')} aria-label={i18n('streamActive')} className="uppy-ScreenCapture-icon--stream uppy-ScreenCapture-icon--streamActive"> | ||
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24"> | ||
<path d="M0 0h24v24H0z" opacity=".1" fill="none" /> | ||
<path d="M0 0h24v24H0z" fill="none" /> | ||
<path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" /> | ||
</svg> | ||
</div> | ||
) | ||
} else { | ||
return ( | ||
<div title={i18n('streamPassive')} aria-label={i18n('streamPassive')} class="uppy-ScreenCapture-icon--stream"><svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" opacity=".1" fill="none" /><path d="M0 0h24v24H0z" fill="none" /><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" /></svg></div> | ||
) | ||
} | ||
return ( | ||
<div title={i18n('streamPassive')} aria-label={i18n('streamPassive')} className="uppy-ScreenCapture-icon--stream"> | ||
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24"> | ||
<path d="M0 0h24v24H0z" opacity=".1" fill="none" /> | ||
<path d="M0 0h24v24H0z" fill="none" /> | ||
<path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" /> | ||
</svg> | ||
</div> | ||
) | ||
} |
@@ -10,10 +10,10 @@ const { h } = require('preact') | ||
<button | ||
class="uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--submit" | ||
className="uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--submit" | ||
type="button" | ||
title={i18n('submitRecordedFile')} | ||
aria-label={i18n('submitRecordedFile')} | ||
onclick={onSubmit} | ||
onClick={onSubmit} | ||
data-uppy-super-focusable | ||
> | ||
<svg aria-hidden="true" focusable="false" class="uppy-c-icon" width="48" height="48" viewBox="0 0 48 48"> | ||
<svg aria-hidden="true" focusable="false" className="uppy-c-icon" width="48" height="48" viewBox="0 0 48 48"> | ||
<path d="M0 0h48v48h-48z" fill="none" /> | ||
@@ -24,5 +24,4 @@ <path d="M38.71 20.07c-1.36-6.88-7.43-12.07-14.71-12.07-5.78 0-10.79 3.28-13.3 8.07-6.01.65-10.7 5.74-10.7 11.93 0 6.63 5.37 12 12 12h26c5.52 0 10-4.48 10-10 0-5.28-4.11-9.56-9.29-9.93zm-10.71 5.93v8h-8v-8h-6l10-10 10 10h-6z" /> | ||
) | ||
} else { | ||
return null | ||
} | ||
return null | ||
} |
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
98758
1448
Updated@uppy/utils@^3.5.0