Chapter renames: - chapter-09-api -> chapter-09-tools (LLM Tools) - chapter-10-api -> chapter-10-rest (REST Endpoints) New documentation: - chapter-04-gbui/admin-user-views.md: Complete guide to User vs Admin interfaces - User Settings (/api/user/*): profile, security, notifications, storage - Admin Panel (/api/admin/*): users, groups, bots, DNS, audit - Permission levels: guest, user, manager, admin - Desktop sync considerations Updated: - Drive app docs with sync feature (rclone, desktop-only) - All cross-references to renamed chapters - SUMMARY.md with new structure and admin-user-views entry
5.9 KiB
Player - Media Viewer
Integrated viewing for documents, audio, video, and presentations
Overview
Player enables users to view and interact with various file types without leaving the conversation:
- Documents: PDF, DOCX, TXT, MD
- Presentations: PPTX, ODP
- Audio: MP3, WAV, OGG, M4A
- Video: MP4, WEBM, OGV
- Images: PNG, JPG, GIF, SVG, WEBP
Accessing Player
From Chat
When a bot shares a file, click the preview to open in Player:
📎 quarterly-report.pptx
Here's the quarterly report. Click to view.
*clicks to open*
📊 Opening presentation viewer...
Use ← → to navigate slides
From Drive
Navigate to Drive tab and click any supported file to open in Player.
Direct URL
Access files directly:
/player/{bot_id}/{file_path}
Controls by File Type
Document Controls
| Control | Action |
|---|---|
| Previous / Next | Navigate pages |
| Zoom in / out | Adjust view size |
| Download | Download original |
| Search | Search in document |
| Thumbnails | Page thumbnails |
Audio Controls
| Control | Action |
|---|---|
| Play / Pause | Control playback |
| Rewind / Forward | Skip 10 seconds |
| Volume | Volume slider |
| Loop | Loop toggle |
| Download | Download file |
Video Controls
| Control | Action |
|---|---|
| Play / Pause | Control playback |
| Skip | Skip backward / forward |
| Volume | Volume control |
| Fullscreen | Enter fullscreen |
| Speed | Playback speed |
| Picture-in-picture | Floating window |
| Download | Download file |
Presentation Controls
| Control | Action |
|---|---|
| Previous / Next | Navigate slides |
| Fullscreen | Presentation mode |
| Overview | Slide overview |
| Notes | Speaker notes (if available) |
| Download | Download original |
Keyboard Shortcuts
| Key | Action |
|---|---|
Space |
Play/Pause (audio/video) or Next (slides) |
← / → |
Previous / Next |
↑ / ↓ |
Volume up / down |
F |
Fullscreen toggle |
M |
Mute toggle |
Esc |
Exit fullscreen / Close player |
+ / - |
Zoom in / out |
Home / End |
Go to start / end |
BASIC Integration
Share Files with Player Preview
🎬 training/welcome-video.mp4
Watch this 2-minute introduction video.
📊 reports/q4-results.pptx
Here are the quarterly results. Use arrow keys to navigate.
🎵 audio/podcast-episode-42.mp3
Listen to the latest episode.
Supported Formats
Documents
| Format | Extension | Notes |
|---|---|---|
.pdf |
Full support with text search | |
| Word | .docx |
Converted to viewable format |
| Text | .txt |
Plain text with syntax highlighting |
| Markdown | .md |
Rendered with formatting |
| HTML | .html |
Sanitized rendering |
Presentations
| Format | Extension | Notes |
|---|---|---|
| PowerPoint | .pptx |
Full slide support |
| OpenDocument | .odp |
Converted to slides |
.pdf |
Treated as slides |
Audio
| Format | Extension | Notes |
|---|---|---|
| MP3 | .mp3 |
Universal support |
| WAV | .wav |
Uncompressed audio |
| OGG | .ogg |
Open format |
| M4A | .m4a |
AAC audio |
| FLAC | .flac |
Lossless audio |
Video
| Format | Extension | Notes |
|---|---|---|
| MP4 | .mp4 |
H.264/H.265 |
| WebM | .webm |
VP8/VP9 |
| OGV | .ogv |
Theora |
Images
| Format | Extension | Notes |
|---|---|---|
| PNG | .png |
Lossless with transparency |
| JPEG | .jpg, .jpeg |
Compressed photos |
| GIF | .gif |
Animated support |
| SVG | .svg |
Vector graphics |
| WebP | .webp |
Modern format |
Configuration
Configure Player behavior in config.csv:
key,value
player-autoplay,false
player-default-volume,80
player-video-quality,auto
player-preload,metadata
player-allow-download,true
player-max-file-size-mb,100
API Access
Get File for Player
GET /api/drive/{bot_id}/files/{file_path}?preview=true
Stream Media
GET /api/drive/{bot_id}/stream/{file_path}
Supports HTTP Range requests for seeking.
Get Thumbnail
GET /api/drive/{bot_id}/thumbnail/{file_path}
Security
- Files are served through authenticated endpoints
- User permissions respected for file access
- Downloads can be disabled per bot
- Watermarking available for sensitive documents
Performance
- Lazy loading for large documents
- Adaptive streaming for video
- Thumbnail generation for previews
- Client-side caching for repeat views
Mobile Support
Player is fully responsive:
- Touch gestures for navigation
- Pinch-to-zoom for documents
- Swipe for slides
- Native fullscreen support
See Also
- Drive App - File management
- Drive Integration - File storage configuration
- Storage API - File management API