
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@flowplayer/spins
Advanced tools
A TypeScript library for creating Flowplayer playlist components optimized for short-form video content like Reels and Shorts.
import { createSpins } from "@flowplayer/spins";
const spinsContainer = createSpins({
playlist: "your-playlist-id",
token: "your-token",
lang: "en",
});
document.body.appendChild(spinsContainer);
import { createSpins, type SpinsConfig } from "@flowplayer/spins";
import { useEffect, useRef } from "react";
function SpinsPlayer({ playlistId }: { playlistId: string }) {
const containerRef = useRef<HTMLDivElement>(null);
useEffect(() => {
if (containerRef.current) {
const spinsContainer = createSpins({
playlist: playlistId,
token: "your-token",
lang: "en",
});
containerRef.current.appendChild(spinsContainer);
}
}, [playlistId]);
return <div ref={containerRef} className="spins-container" />;
}
npm install @flowplayer/spins
# or
bun add @flowplayer/spins
import { spins, type SpinsConfig } from "@flowplayer/spins";
// Create a playlist component for short-form content
const config: SpinsConfig = {
playlist: "your-playlist-id", // or array of SpinItem objects
token: "your-flowplayer-token",
lang: "en"
};
const spinsContainer = spins(config);
document.body.appendChild(spinsContainer);
This library is specifically designed to handle short-form video playlists, making it easy to create engaging vertical video experiences similar to:
The component automatically handles playlist loading and provides the structure needed for smooth, mobile-optimized video playback.
createSpins(config: SpinsConfig): SpinsContainer
Creates a Flowplayer playlist component container optimized for short-form video content.
config.playlist: string | Array<SpinConfig>
- The playlist ID or array of spin configurationsconfig.token: string
- Your Flowplayer tokenconfig.lang: string
- Language code (e.g., "en", "es")Returns a SpinsContainer
(extends HTMLElement
) with event handling capabilities:
on(event, handler)
- Subscribe to eventsoff(event, handler)
- Unsubscribe from eventsSPIN_CREATED
- Fired when a new spin is createdSPIN_IN_VIEWPORT
- Fired when a spin enters the viewportThe function gracefully handles:
The library exports TypeScript types for full type safety:
import { type SpinsConfig, type SpinItem, type SpinsContainer } from "@flowplayer/spins";
SpinsConfig
The main configuration interface:
interface SpinsConfig {
playlist: string | Array<SpinItem>;
token: string;
lang: string;
}
SpinItem
Individual spin configuration:
interface SpinItem {
src: Config["src"];
title?: string;
poster?: string;
description?: string;
subtitles?: SubtitlesConfig["subtitles"];
}
The component includes default CSS styling optimized for short-form video content. Styles are imported from: You can override styles by targeting the spins container and its children:
.spins-container {
/* Base spins container styles */
}
flowplayer-spin {
/* Individual spin container styles */
}
# Development with Storybook
bun run dev
# Build the library
bun run build
# Build TypeScript declarations
bun run build:dts
# Run tests
bun run test
# Lint and format code
bun run lint
# Build Storybook for production
bun run build-storybook
This project uses:
This is a paid feature of the Wowza Flowplayer platform. Usage requires a valid Flowplayer license.
FAQs
Unknown package
The npm package @flowplayer/spins receives a total of 9 weekly downloads. As such, @flowplayer/spins popularity was classified as not popular.
We found that @flowplayer/spins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 open source maintainers 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.