Files
v10/packages/react-native/react-native-media-elements/src/index.tsx
T
Christian PillsburyandClaude 34e35f399b refactor: convert React Native packages to stubs and fix remaining build issues
- Convert @vjs-10/react-native packages to placeholder stubs for future implementation
- Move Video.tsx from @vjs-10/react-media-elements to @vjs-10/react package
- Fix React JSX compilation errors by changing jsx config from react-jsx to react
- Add React imports to all TSX files to resolve UMD global errors
- Remove React Native specific dependencies from package.json files
- Refactor @vjs-10/react-media-elements to export VideoElement/AudioElement with placeholders
- All packages now build successfully with monorepo architecture intact

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 13:45:08 -07:00

46 lines
1.1 KiB
TypeScript

import * as React from 'react';
// Placeholder exports for React Native Media Elements package
// These will be implemented in a future step
export interface MediaElementProps {
source?: { uri: string };
controls?: boolean;
paused?: boolean;
muted?: boolean;
volume?: number;
rate?: number;
repeat?: boolean;
resizeMode?: 'contain' | 'cover' | 'stretch';
onLoad?: (data: any) => void;
onProgress?: (data: any) => void;
onEnd?: () => void;
onError?: (error: any) => void;
style?: any; // React Native ViewStyle
}
export interface MediaElementRef {
currentTime: number;
duration: number;
paused: boolean;
ended: boolean;
volume: number;
muted: boolean;
playbackRate: number;
readyState: number;
networkState: number;
play(): Promise<void>;
pause(): void;
load(): void;
seek(time: number): void;
}
// Placeholder component - will be implemented later
export const VideoElement = React.forwardRef<MediaElementRef, MediaElementProps>(
(_, __) => {
return React.createElement('div', { children: 'React Native VideoElement - Coming Soon' });
}
);
VideoElement.displayName = 'VideoElement';