Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
svelte-audio
Advanced tools
Audio Player Component for Svelte.
It uses APlayer under the hood!
pnpm i -D svelte-audio
<script lang="ts">
import { Audio } from "svelte-audio";
import { playlist } from "./playlist";
let paused = false;
let time = 0;
let volume = 1;
let mini = false;
</script>
<audio bind:paused bind:time bind:volume bind:mini {playlist}>
<!-- Loading Slot -->
<div>Loading ...</div>
</audio>
Paused: <input type="checkbox" bind:checked="{paused}" /> Volume:
<input type="range" min="0" max="1" step="0.01" bind:value="{volume}" /> Mini:
<input type="checkbox" bind:checked="{mini}" /> Current Time: {time}s
import type { Playlist } from "svelte-audio";
export const playlist: Playlist = [
{
name: "ChatGPT Help Me!",
artist: "Jacob, GPT-4, Suno v3",
cover: "https://cdn1.suno.ai/image_6aee2edf-ba1e-4394-b75e-7385261c4e07.png",
url: "https://cdn1.suno.ai/ebb95c9f-ef34-4cd1-b0f1-d8a97666550a.mp3",
lrc: "https://storage.jacoblin.cool/ChatGPT-Help-Me.lrc",
},
{
name: "Flavors of the Night: Taipei",
artist: "Jacob, GPT-4, Suno v3",
cover: "https://cdn1.suno.ai/image_3400c31e-d6ec-4101-80b1-1ae11dd3d220.png",
url: "https://cdn1.suno.ai/3400c31e-d6ec-4101-80b1-1ae11dd3d220.mp3",
},
];
To see the full list of props, check out the Storybook.
You can access the APlayer instance by using the .player()
method.
<script lang="ts">
import { Audio } from "svelte-audio";
import { playlist } from "./playlist";
let audio: Audio;
function remove() {
audio.player().list.clear();
}
</script>
<Audio bind:this={audio} {playlist}>
<div>Loading ...</div>
</Audio>
<button on:click={remove}> Remove Songs </button>
See all the API methods in the APlayer Documentation.
FAQs
Audio Player Component for Svelte.
The npm package svelte-audio receives a total of 45 weekly downloads. As such, svelte-audio popularity was classified as not popular.
We found that svelte-audio 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.