<DriveAudio /> & <DrivePlaylist />
Stream Google Drive hosted audio files with custom waveform visualization.
Overview
DriveAudio features HTML5 audio streaming, canvas waveform visualization, duration display, volume control, and multi-track playlist navigation.
Code Example
drive-audio.tsx
| 1 | import { DriveAudio, DrivePlaylist } from '@driveloader/react'; |
| 2 | |
| 3 | // Single Audio Track |
| 4 | <DriveAudio src="https://drive.google.com/file/d/AUDIO_ID/view" title="Song Title" artist="Artist" /> |
| 5 | |
| 6 | // Playlist |
| 7 | <DrivePlaylist tracks={[{ src: 'ID_1' }, { src: 'ID_2' }]} /> |
Best Practices
- •Always provide track titles and artist names manually, as Google Drive metadata extraction for audio is limited.
