본문으로 건너뛰기
cccskills
무료GitHub에 공개

helios-player

Player API for embedding Helios compositions in web pages. Use when you need to display a composition with playback controls, enable client-side exporting, or support Picture-in-Picture.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios스타 123(GitHub 123 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Helios Player API

The <helios-player> Web Component allows you to embed and control Helios compositions in any web application. It handles loading the composition in an iframe and establishing a bridge for control and state management.

Quick Start

<script type="module" src="path/to/@helios-project/player/dist/index.js"></script>

<helios-player
  src="composition.html"
  width="1280"
  height="720"
  controls
  autoplay
  input-props='{"title": "My Video"}'
></helios-player>

API Reference

HTML Attributes

AttributeTypeDescription
srcstringURL of the composition (must contain Helios logic)
widthnumberDisplay width (maintains aspect ratio if height also set)
heightnumberDisplay height
controlsbooleanShow built-in playback controls (Play, Volume, Captions, Export)
controlsliststringSpace-separated list of features to hide: nodownload, nofullscreen
autoplaybooleanStart playing immediately when ready
loopbooleanLoop playback when finished
mutedbooleanMute audio initially
posterstringURL of an image to show before playback
preload'auto' | 'none'Preload behavior (default: 'auto')
interactivebooleanAllow direct interaction with the iframe content (disables overlay)
input-propsJSON stringPass initial properties to the composition
export-mode'auto' | 'canvas' | 'dom'Strategy for client-side export (default: 'auto')
export-format'mp4' | 'webm'Output format for client-side export (default: 'mp4')
export-caption-mode'burn-in' | 'file'How to handle captions during export (default: 'burn-in')
export-widthnumberWidth of the exported video (independent of display width)
export-heightnumberHeight of the exported video
export-bitratenumberTarget bitrate for export (bits/s)
export-filenamestringFilename for export (default: 'video')
disablepictureinpicturebooleanDisable the Picture-in-Picture button
canvas-selectorstringCSS selector for the canvas element (default: 'canvas')
sandboxstringIframe sandbox flags (default: 'allow-scripts allow-same-origin')

CSS Variables (Theming)

You can customize the player's appearance using CSS variables:

helios-player {
  --helios-controls-bg: rgba(0, 0, 0, 0.8);
  --helios-text-color: #ffffff;
  --helios-accent-color: #ff0000;
  --helios-range-track-color: #555555;
  --helios-range-selected-color: rgba(255, 255, 255, 0.5);
  --helios-font-family: 'Helvetica', sans-serif;
}

JavaScript API

The element implements a Standard Media API-like interface for easy integration with video wrappers.

const player = document.querySelector('helios-player');

// Playback Control
player.play();
player.pause();
player.load();
player.requestPictureInPicture(); // Enter PiP mode
player.currentTime = 5.0; // Seek to 5 seconds
player.currentFrame = 150; // Seek to frame 150

// Audio Control
player.volume = 0.5; // 0.0 to 1.0
player.muted = true;

// Writable Properties
console.log(player.duration);     // Total duration in seconds
console.log(player.paused);       // Boolean
console.log(player.playbackRate); // Speed multiplier
console.log(player.fps);          // Composition FPS
console.log(player.loop);         // Loop state
console.log(player.autoplay);     // Autoplay state

// Read-Only Properties
console.log(player.videoWidth);   // Intrinsic width
console.log(player.videoHeight);  // Intrinsic height
console.log(player.readyState);   // 0-4 (HAVE_NOTHING to HAVE_ENOUGH_DATA)
console.log(player.networkState); // 0-3 (EMPTY, IDLE, LOADING, NO_SOURCE)
console.log(player.seeking);      // Boolean (true while scrubbing)
console.log(player.played);       // TimeRanges object of played segments
console.log(player.buffered);     // TimeRanges object of buffered segments
console.log(player.seekable);     // TimeRanges object of seekable segments
console.log(player.error);        // MediaError object if failed

// Input Props
player.inputProps = { title: "Updated Title" };

// Text Tracks
console.log(player.textTracks);
const track = player.addTextTrack("captions", "English", "en");

// Access active cues
track.addEventListener("cuechange", () => {
  console.log("Active Cues:", track.activeCues);
});

Events

The player dispatches standard media events:

  • loadstart, loadedmetadata, loadeddata, canplay, canplaythrough
  • play, pause, ended, playing
  • timeupdate, seeking, seeked
  • volumechange
  • durationchange, ratechange
  • error

Advanced Control

For low-level access to the Helios state, use getController().

const controller = player.getController();

if (controller) {
  const state = controller.getState();

  // Dynamic Updates
  controller.setDuration(30);       // Update duration to 30s
  controller.setFps(60);            // Update FPS to 60
  controller.setSize(1080, 1080);   // Update resolution
  controller.setMarkers([{ id: "m1", time: 5, label: "Intro" }]);
}

Diagnostics

View environment capabilities (WebCodecs, WebGL) by pressing Shift+D to toggle the overlay, or calling diagnose() programmatically.

const report = await player.diagnose();
console.log("WebCodecs support:", report.webCodecs);

Captions

You can provide captions by adding a <track> element as a child.

<helios-player src="...">
  <track kind="captions" src="captions.srt" default>
</helios-player>

The player will fetch the SRT file and pass it to the Helios controller.

Client-Side Export

The player supports exporting videos directly in the browser (using VideoEncoder).

  1. Formats: Supports mp4 (H.264/AAC) and webm (VP9/Opus).
  2. Audio: Captures audio from <audio> elements (must be CORS-enabled).
  3. Captions: Supports "burning in" captions (export-caption-mode="burn-in") or saving as sidecar file (export-caption-mode="file").
  4. Resolution: Configure export resolution independently of player size using export-width and export-height.
  5. Usage: User clicks "Export" in controls, or call clientSideExporter manually (internal API).

UI Features

  • Captions: Toggle "CC" button to overlay active captions.
  • Volume: Slider and Mute toggle.
  • Speed: Selector for playback rate (0.25x - 2x).
  • Fullscreen: Toggle fullscreen mode.
  • Scrubber: Visual playback range indication.
  • Responsive: Controls adapt to small widths (compact/tiny modes).

Common Issues

  • Cross-Origin (CORS): The player uses an iframe. If the src is on a different origin, ensure CORS headers are set.
  • Audio Export: Audio elements must serve data with Access-Control-Allow-Origin to be captured by the exporter.

Source Files

  • Component: packages/player/src/index.ts
  • Exporter: packages/player/src/features/exporter.ts

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Story-first motion design philosophy for animated video: motion must earn its place; arc (establish, complicate, resolve); show vs tell; shots as units of thought; quiet vs loud motion; Disney principles with restraint; timing heuristics; composition; grammar by medium (product demos, logos, data viz, explainers); technical commitments (deterministic time, scrubbability, refs); cutting discipline; explicit anti-patterns. Use when planning, storyboarding, critiquing, or implementing programmatic or motion-driven video (Helios, Remotion, explainers, loops, UI capture, logo reveals), or when the user asks for motion direction, pacing, or visual-story structure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios1232026년 10월 26일 업데이트

Find, preview, cut and credit archival B-roll from the Internet Archive (archive.org) for a Helios video — public-domain, CC BY and CC BY-SA film plus Prelinger Archives. Use when a Helios composition needs real footage as a plate, cutaway, masked fill or texture. Not for generating footage or editing the user's own camera video.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios1232026년 10월 26일 업데이트

End-to-end production plan template for feeling-first cinematic product promos: brief interrogation, 45s beat structure (cold open through brand), hero-element metaphor, storyboard fidelity ladder, visual system (palette, type, camera, texture), motion mix and easing vocabulary, audio and captions, tooling (animatic through HTML or AE), deliverables matrix, accessibility, review milestones, and compromises to accept or refuse. Use when planning, pitching, storyboarding, or producing polished brand films for any SaaS or consumer product—not category-specific; pair with skills/design/animated-video-philosophy for broader motion principles.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios1232026년 10월 26일 업데이트

Workflow for creating a new Helios composition. Use when building a new animation project or converting an existing animation to run in Helios.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios1232026년 10월 26일 업데이트

Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios1232026년 10월 26일 업데이트

Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BintzGavin/helios1232026년 10월 26일 업데이트

BintzGavin의 스킬 모두 보기

이 스킬의 문제 신고