feat(packages): add UI support for gestures and hotkeys (#1388)

Co-authored-by: Rahim <rahim.alwer@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sam Potts
2026-05-05 10:34:12 +10:00
committed by GitHub
co-authored by Rahim Claude Opus 4.6
parent 6c81f2d190
commit 0620814a67
187 changed files with 5665 additions and 405 deletions
@@ -0,0 +1,20 @@
'use client';
import type { StatusIndicatorCore } from '@videojs/core';
import { createContext, type ProviderProps, useContext } from 'react';
export interface StatusIndicatorContextValue {
state: StatusIndicatorCore.State;
}
const StatusIndicatorContext = createContext<StatusIndicatorContextValue | null>(null);
export function StatusIndicatorProvider({ value, children }: ProviderProps<StatusIndicatorContextValue>) {
return <StatusIndicatorContext.Provider value={value}>{children}</StatusIndicatorContext.Provider>;
}
export function useStatusIndicatorContext(): StatusIndicatorContextValue {
const ctx = useContext(StatusIndicatorContext);
if (!ctx) throw new Error('StatusIndicator child compounds must be used within a StatusIndicator.Root');
return ctx;
}