Quick Start Guide
Start loading Google Drive images and streaming videos in under 2 minutes.
quick-start.tsx
| 1 | import { DriveImage, DriveVideo } from '@driveloader/react'; |
| 2 | import '@driveloader/react/styles.css'; |
| 3 | |
| 4 | export function Gallery() { |
| 5 | return ( |
| 6 | <div className="space-y-4"> |
| 7 | <DriveImage src="https://drive.google.com/file/d/IMAGE_ID/view" alt="Photo" /> |
| 8 | <DriveVideo src="https://drive.google.com/file/d/VIDEO_ID/view" controls /> |
| 9 | </div> |
| 10 | ); |
| 11 | } |
Usage Notes
DriveLoader handles resolution, CORS retries, preloader probes, and in-memory caching behind the scenes.
