Setup
Install Helios core and Vue dependencies:Implementation
Composable for frame synchronization
Create a composable to subscribe to Helios frame updates:ref to create a reactive frame reference and onUnmounted to handle cleanup when the component is destroyed.
Main component
Build your composition using Vue’s template syntax and theuseVideoFrame composable:
Key Vue patterns
Composable-based state management
TheuseVideoFrame composable encapsulates Helios subscription logic using Vue’s Composition API. It returns a reactive ref that automatically triggers re-renders when the frame changes.
Dynamic style bindings
Use Vue’s:style binding to apply dynamic animations. Calculations happen in the template, keeping the component concise and reactive.
Script setup syntax
The<script setup> syntax provides a clean, TypeScript-friendly way to define component logic without boilerplate. Variables and imports are automatically available in the template.
Scoped styles
Scoped styles ensure CSS only applies to this component, preventing style leakage while maintaining clean separation between logic and presentation.Usage
Run the development server:window.helios for debugging and player control.