{"_id":"@diesanromerollc/videoplayer","_rev":"2-ba9827cb66ab013ecce9318f3c181710","name":"@diesanromerollc/videoplayer","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@diesanromerollc/videoplayer","version":"1.0.0","keywords":["react-native","video","player","expo","cross-platform","web","ios","android"],"author":{"name":"Diesan Romero LLC"},"license":"MIT","_id":"@diesanromerollc/videoplayer@1.0.0","maintainers":[{"name":"diesanromero","email":"diesanromero@gmail.com"}],"homepage":"https://github.com/Diesan-Romero-LLC/videoplayer#readme","bugs":{"url":"https://github.com/Diesan-Romero-LLC/videoplayer/issues"},"dist":{"shasum":"e5cc1716f7814b8d3e7ab57150ed20b8384800a5","tarball":"https://registry.npmjs.org/@diesanromerollc/videoplayer/-/videoplayer-1.0.0.tgz","fileCount":24,"integrity":"sha512-PCFyOK226VW7nqfgZ1JFfgl+ZNCEV2i3VilT7qb5VfpfUt0Qn8zmCXB5gBdmYy9r1aNJ+kJvUHaO2KgpOtHACA==","signatures":[{"sig":"MEQCIGYuNGa+KHpdxx/CBCD5YWVO2Jobcc8brJeKPPVsCKEjAiBWO5H5vVNI3IWwODww5u7hXjwNvsVO5zzF9AP7HL1XMg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74931},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"5e8af7eb2d3711a4eed68dfb20c11b14732c5d62","scripts":{"test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"diesanromero","email":"diesanromero@gmail.com"},"repository":{"url":"git+https://github.com/Diesan-Romero-LLC/videoplayer.git","type":"git"},"_npmVersion":"11.6.2","description":"A cross-platform video player component for React Native with web support","directories":{},"_nodeVersion":"22.21.0","dependencies":{"lucide-react-native":"^0.556.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^18.0.0","@types/react-native":"^0.70.0"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.70.0","react-native-video":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/videoplayer_1.0.0_1765382917920_0.3767535128824535","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@diesanromerollc/videoplayer","version":"1.0.1","description":"A cross-platform video player component for React Native with web support","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"jest"},"keywords":["react-native","video","player","expo","cross-platform","web","ios","android"],"author":{"name":"Diesan Romero LLC"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Diesan-Romero-LLC/videoplayer.git"},"bugs":{"url":"https://github.com/Diesan-Romero-LLC/videoplayer/issues"},"homepage":"https://github.com/Diesan-Romero-LLC/videoplayer#readme","peerDependencies":{"react":">=18.0.0","react-native":">=0.70.0","react-native-video":"^6.0.0"},"dependencies":{"lucide-react-native":"^0.556.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-native":"^0.70.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"gitHead":"bd465adce8eb3fa9df3a788c20f2110be019f65b","_id":"@diesanromerollc/videoplayer@1.0.1","_nodeVersion":"22.21.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-k58HxRyLZBawuWw1vIC4RgSqhuVz05NgonKSSom4B9XE81NE+uovQv/b7dMp/lLvlpXfvoo4Z4CC/EYr8T+YIw==","shasum":"51bdcb0ad2b26521a80d8c013d3997cb81042b93","tarball":"https://registry.npmjs.org/@diesanromerollc/videoplayer/-/videoplayer-1.0.1.tgz","fileCount":24,"unpackedSize":74931,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDliizogKJLfWS/uwj3r8DBpsyJu4K2im37FeM9mz6ArAiEAnmuE9NNfDDwT4c9Yb0/fgFGLlmorGvIrFHqOr1dEkc4="}]},"_npmUser":{"name":"diesanromero","email":"diesanromero@gmail.com"},"directories":{},"maintainers":[{"name":"diesanromero","email":"diesanromero@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/videoplayer_1.0.1_1765383157533_0.17822686234399332"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-10T16:08:37.858Z","modified":"2025-12-10T16:12:37.985Z","1.0.0":"2025-12-10T16:08:38.097Z","1.0.1":"2025-12-10T16:12:37.678Z"},"bugs":{"url":"https://github.com/Diesan-Romero-LLC/videoplayer/issues"},"author":{"name":"Diesan Romero LLC"},"license":"MIT","homepage":"https://github.com/Diesan-Romero-LLC/videoplayer#readme","keywords":["react-native","video","player","expo","cross-platform","web","ios","android"],"repository":{"type":"git","url":"git+https://github.com/Diesan-Romero-LLC/videoplayer.git"},"description":"A cross-platform video player component for React Native with web support","maintainers":[{"name":"diesanromero","email":"diesanromero@gmail.com"}],"readme":"# @diesanromerollc/videoplayer\n\nA cross-platform video player component for React Native with web support. Built with TypeScript and designed to be highly customizable.\n\n## Features\n\n- 🎥 **Cross-platform**: Works on iOS, Android, and Web\n- 🎨 **Customizable**: Theme, icons, and components can be customized\n- 📱 **Responsive**: Adapts to different screen sizes\n- ⚡ **Performance**: Optimized for smooth playback\n- 🔧 **TypeScript**: Full TypeScript support\n- 🎛️ **Controls**: YouTube-style controls with volume, playback speed, and more\n- 📦 **Lightweight**: Minimal dependencies\n\n## Installation\n\n```bash\nnpm install @diesanromerollc/videoplayer\n# or\nyarn add @diesanromerollc/videoplayer\n# or\npnpm add @diesanromerollc/videoplayer\n```\n\n### Peer Dependencies\n\nThis package requires the following peer dependencies:\n\n- `react` >= 18.0.0\n- `react-native` >= 0.70.0\n- `react-native-video` >= 6.0.0 (for native platforms)\n\n### Install Peer Dependencies\n\n```bash\nnpm install react-native-video\n# For iOS, you may need to run:\ncd ios && pod install\n```\n\n## Basic Usage\n\n```tsx\nimport { VideoPlayer } from '@diesanromerollc/videoplayer';\n\nfunction MyComponent() {\n  return (\n    <VideoPlayer\n      uri=\"https://example.com/video.mp4\"\n      posterUri=\"https://example.com/poster.jpg\"\n      title=\"My Video\"\n      onPlay={() => console.log('Playing')}\n      onPause={() => console.log('Paused')}\n      onEnd={() => console.log('Ended')}\n    />\n  );\n}\n```\n\n## Advanced Usage\n\n### Custom Theme\n\n```tsx\nimport { VideoPlayer, defaultTheme } from '@diesanromerollc/videoplayer';\n\nconst customTheme = {\n  ...defaultTheme,\n  colors: {\n    ...defaultTheme.colors,\n    primary: '#00ff00',\n    progressBar: '#00ff00',\n  },\n};\n\n<VideoPlayer\n  uri=\"https://example.com/video.mp4\"\n  theme={customTheme}\n/>\n```\n\n### Custom Icons\n\n```tsx\nimport { VideoPlayer } from '@diesanromerollc/videoplayer';\nimport { CustomPlayIcon, CustomPauseIcon } from './icons';\n\n<VideoPlayer\n  uri=\"https://example.com/video.mp4\"\n  icons={{\n    Play: CustomPlayIcon,\n    Pause: CustomPauseIcon,\n  }}\n/>\n```\n\n### Custom Text Component\n\n```tsx\nimport { VideoPlayer } from '@diesanromerollc/videoplayer';\nimport { MyCustomText } from './components';\n\n<VideoPlayer\n  uri=\"https://example.com/video.mp4\"\n  TextComponent={MyCustomText}\n/>\n```\n\n### Custom Preferences\n\n```tsx\nimport { VideoPlayer } from '@diesanromerollc/videoplayer';\n\n<VideoPlayer\n  uri=\"https://example.com/video.mp4\"\n  preferences={{\n    autoPlay: true,\n    playbackSpeed: 1.5,\n  }}\n/>\n```\n\n### Safe Area Insets\n\n```tsx\nimport { VideoPlayer } from '@diesanromerollc/videoplayer';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nfunction MyComponent() {\n  const insets = useSafeAreaInsets();\n  \n  return (\n    <VideoPlayer\n      uri=\"https://example.com/video.mp4\"\n      safeAreaInsets={insets}\n    />\n  );\n}\n```\n\n## API Reference\n\n### VideoPlayer Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `uri` | `string` | **required** | Video source URI |\n| `posterUri` | `string` | `undefined` | Poster/thumbnail image URI |\n| `title` | `string` | `undefined` | Video title to display |\n| `onClose` | `() => void` | `undefined` | Callback when close button is pressed |\n| `autoPlay` | `boolean` | `false` | Auto-play video on load |\n| `showControls` | `boolean` | `true` | Show controls overlay |\n| `onPlay` | `() => void` | `undefined` | Callback when video starts playing |\n| `onPause` | `() => void` | `undefined` | Callback when video is paused |\n| `onEnd` | `() => void` | `undefined` | Callback when video ends |\n| `onError` | `(error: Error) => void` | `undefined` | Callback when video encounters an error |\n| `onProgress` | `(currentTime: number, duration: number) => void` | `undefined` | Callback when video position changes |\n| `resizeMode` | `\"contain\" \\| \"cover\" \\| \"stretch\"` | `\"contain\"` | Custom resize mode |\n| `fullscreen` | `boolean` | `false` | Enable fullscreen mode |\n| `muted` | `boolean` | `false` | Mute video by default |\n| `rate` | `number` | `1.0` | Playback rate (1.0 = normal speed) |\n| `volume` | `number` | `1.0` | Volume (0.0 to 1.0) |\n| `style` | `ViewStyle` | `undefined` | Custom styles |\n| `testID` | `string` | `undefined` | Test ID for testing |\n| `theme` | `Partial<VideoPlayerTheme>` | `defaultTheme` | Custom theme |\n| `TextComponent` | `ComponentType<TextProps>` | `Text` | Custom Text component |\n| `icons` | `VideoPlayerIcons` | `undefined` | Custom icons |\n| `preferences` | `VideoPreferences` | `undefined` | Video preferences |\n| `safeAreaInsets` | `EdgeInsets` | `undefined` | Safe area insets |\n\n### VideoPlayerState\n\n```typescript\ninterface VideoPlayerState {\n  isPlaying: boolean;\n  isLoading: boolean;\n  isInitialLoad: boolean;\n  position: number; // milliseconds\n  duration: number; // milliseconds\n  showControls: boolean;\n  error: string | null;\n  isBuffering: boolean;\n  isReady: boolean;\n  rate: number;\n  volume: number;\n  muted: boolean;\n  fullscreen: boolean;\n}\n```\n\n### VideoPlayerControls\n\n```typescript\ninterface VideoPlayerControls {\n  play: () => Promise<void>;\n  pause: () => Promise<void>;\n  togglePlayPause: () => Promise<void>;\n  seek: (position: number) => Promise<void>;\n  replay: () => Promise<void>;\n  setRate: (rate: number) => void;\n  setVolume: (volume: number) => void;\n  toggleMute: () => void;\n  enterFullscreen: () => void;\n  exitFullscreen: () => void;\n  showControls: () => void;\n  hideControls: () => void;\n  toggleControls: () => void;\n}\n```\n\n## Hooks\n\n### useVideoPlayer\n\nCustom hook for managing video player state and controls.\n\n```tsx\nimport { useVideoPlayer } from '@diesanromerollc/videoplayer';\n\nconst { state, controls, videoRef } = useVideoPlayer({\n  uri: 'https://example.com/video.mp4',\n  autoPlay: false,\n  onPlay: () => console.log('Playing'),\n  onPause: () => console.log('Paused'),\n});\n```\n\n### useVideoPreferences\n\nHook for managing video preferences (optional).\n\n```tsx\nimport { useVideoPreferences } from '@diesanromerollc/videoplayer';\n\nconst { autoPlay, playbackSpeed } = useVideoPreferences();\n```\n\n## Utilities\n\n### formatTime\n\nFormat milliseconds to time string (MM:SS).\n\n```tsx\nimport { formatTime } from '@diesanromerollc/videoplayer';\n\nconst timeString = formatTime(125000); // \"2:05\"\n```\n\n## Platform Support\n\n- ✅ iOS\n- ✅ Android\n- ✅ Web (HTML5 video)\n\n## Development\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Testing\n\n```bash\nnpm test\n```\n\n## License\n\nMIT\n\n## Repository\n\n[https://github.com/Diesan-Romero-LLC/videoplayer](https://github.com/Diesan-Romero-LLC/videoplayer)\n\n## Support\n\nFor issues and feature requests, please use the [GitHub issue tracker](https://github.com/Diesan-Romero-LLC/videoplayer/issues).\n","readmeFilename":"README.md"}