
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@daviddarnes/sample-input
Advanced tools
A Web Component to sample audio or video added to an upload input
sample-inputA Web Component to sample audio or video added to an upload input
General usage example:
<script type="module" src="sample-input.js"></script>
<sample-input>
<input aria-controls="preview" type="file">
<audio id="preview" aria-live="polite" controls></audio>
</sample-input>
Example usage with the capture option to record live audio (not compatible with all hardware) and placeholder audio:
<script type="module" src="sample-input.js"></script>
<sample-input>
<input aria-controls="preview" type="file" accept="audio/*" capture>
<audio id="preview" aria-live="polite" controls src="https://darn.es/sounds/daviddarnes.m4a"></audio>
</sample-input>
This Web Component allows you to:
audio or video element so it can be previewedYou have a few options (choose one of these):
npm install @daviddarnes/sample-inputMake sure you include the <script> in your project (choose one of these):
<!-- Host yourself -->
<script type="module" src="sample-input.js"></script>
<!-- 3rd party CDN, not recommended for production use -->
<script type="module" src="https://www.unpkg.com/@daviddarnes/sample-input@1.0.0/sample-input.js"></script>
<!-- 3rd party CDN, not recommended for production use -->
<script type="module" src="https://esm.sh/@daviddarnes/sample-input@1.0.0"></script>
With thanks to the following people:
FAQs
A Web Component to sample audio or video added to an upload input
We found that @daviddarnes/sample-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.