
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@daviddarnes/is-playing
Advanced tools
A Web Component to indicate when an audio, or video, element is playing
is-playing
A Web Component to indicate when an audio, or video, element is playing.
<script type="module" src="is-playing.js"></script>
<is-playing>
<audio controls src="https://darn.es/sounds/daviddarnes.m4a"></audio>
</is-playing>
This Web Component allows you to:
audio
or video
element is playing, using :state(playing)
state selector:playing
CSS selectoraudio
or video
element playing with a playing
attribute value on the is-playing
elementYou have a few options (choose one of these):
npm install @daviddarnes/is-playing
Make sure you include the <script>
in your project (choose one of these):
<!-- Host yourself -->
<script type="module" src="is-playing.js"></script>
<!-- 3rd party CDN, not recommended for production use -->
<script
type="module"
src="https://www.unpkg.com/@daviddarnes/is-playing@2.0.0/is-playing.js"
></script>
<!-- 3rd party CDN, not recommended for production use -->
<script
type="module"
src="https://esm.sh/@daviddarnes/is-playing@2.0.0"
></script>
audio
and video
elementsis-playing
will also reveal which audio element is playing by adding a playing
attribute to itself with the value of the playing elements ID. Note that in order for this to happen the playing element must have an id
and there needs to be at least 2 audio
or video
elements:
<is-playing>
<audio
id="audio-2"
controls
src="https://darn.es/sounds/daviddarnes2.m4a"
></audio>
<audio
id="audio-3"
controls
src="https://darn.es/sounds/daviddarnes3.m4a"
></audio>
</is-playing>
With thanks to the following people:
FAQs
A Web Component to indicate when an audio, or video, element is playing
We found that @daviddarnes/is-playing demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.