Audio Streaming & Offline Playback App

Заказчик: AI | Опубликовано: 16.12.2025
Бюджет: 750 $

Detailed Technical Brief for Audio Streaming Mobile App Project Overview Native iOS and Android mobile application for streaming audio content (audiobooks/podcasts) with offline capabilities, background playback, and webview integration. Core Requirements 1. Platform Support - **iOS:** Native Swift implementation (iOS 14+) - **Android:** Native Kotlin implementation (Android 8.0+) - **Webview Integration:** Bidirectional communication with web app 2. Audio Playback Features Essential Playback - Stream audio from remote URLs (MP3/AAC/M4A formats) - Play/Pause/Stop controls - Seek to specific timestamp - Playback speed control (0.5x, 0.75x, 1x, 1.25x, 1.5x, 2x) - Volume control - Track progress reporting (current position, duration, buffering state) Background & Lock Screen - Continue playback when app is backgrounded - Continue playback when device is locked - Lock-screen media controls (play/pause, skip, artwork, title, author) - Notification controls (persistent notification on Android, media controls on iOS) - Handle audio interruptions (phone calls, other apps, alarms) - Audio focus management (duck/pause when other audio plays) Offline Mode - Download audio files for offline playback - Queue management for downloads - Storage management (track downloaded files, allow deletion) - Seamless switch between streaming and offline playback - Progress persistence (resume from last position even offline) 3. State Management & Sync Native as Source of Truth - All playback state managed in native layer - Playback position, track info, playing/paused status stored natively - Persist state across app restarts Webview Communication - Native → Webview: Push current state via postMessage - Track loaded - Playback position (every 1-5 seconds) - Playing/paused/buffering status - Download progress - Error states - Webview → Native: Receive commands via JavaScript bridge - Load track - Play/pause/seek - Change speed - Download track - Get current state - **Fast Resync:** On webview reload/reconnect, native immediately pushes full current state 4. User Interface Requirements Lock Screen / Notification - Album artwork - Track title - Author/artist name - Play/pause button - Skip forward/backward (15 or 30 seconds) - Progress bar (iOS lock screen) In-App (Webview) - Web app handles UI - Native provides real-time state updates - Smooth, lag-free control response 5. Network & Performance Streaming - Adaptive buffering (preload next chunks) - Handle network interruptions gracefully - Resume streaming after connection loss - Background network activity (iOS-compliant, tied to audio playback) Performance - Low battery consumption - Efficient memory usage - No audio dropouts or stuttering - Fast track loading (<2 seconds on good connection) 6. Data Persistence - Last played position per track - Downloaded files metadata - Playback history (optional) - User preferences (speed, volume) Technical Specifications iOS (Swift) - **Audio Framework:** AVFoundation (AVPlayer/AVQueuePlayer) - **Background Mode:** Audio, AirPlay, Picture in Picture enabled - **Lock Screen:** MPNowPlayingInfoCenter + MPRemoteCommandCenter - **Storage:** FileManager for offline files - **Webview Bridge:** WKWebView + WKScriptMessageHandler Android (Kotlin) - Audio Framework: ExoPlayer or MediaPlayer - Background Service: Foreground Service with notification - Media Session:MediaSessionCompat for lock screen controls - Storage:Internal/external storage for offline files - Webview Bridge: WebView + JavascriptInterface Communication Protocol - **Message Format:** JSON via postMessage - **Commands:** `{action: "play", trackId: "123", url: "...", position: 0}` - Events: `{event: "stateChange", state: "playing", position: 45.2, duration: 180}` Deliverables Code 1. OS Native Module** - Audio playback engine - Background/lock screen handling - Offline download manager - Webview bridge implementation - State persistence 2. **Android Native Module** - Audio playback engine - Background service + notification - Offline download manager - Webview bridge implementation - State persistence 3. Ιntegration Documentation - JavaScript API for webview - Message protocol specification - Setup instructions - Code examples Testing - Test on physical devices (iOS and Android) - Background playback testing - Lock screen controls testing - Offline mode testing - Network interruption handling - Audio interruption handling (calls, alarms) Support - Bug fixes during initial integration (2-4 weeks post-delivery) Documentation for maintenance Out of Scope - Web app development (you provide the webview content) - Backend API development (you provide audio URLs and metadata) - App Store/Play Store submission - UI design (handled by web app) - User authentication (handled by web app) - Payment processing - Analytics integration (can be added separately) Success Criteria Audio plays continuously in background and when locked Lock screen shows controls and artwork Offline downloads work and play without network Webview and native stay in sync in real-time No audio dropouts or crashes Fast resync after app restart or webview reload Handles interruptions (calls, other audio) gracefully Works on iOS 14+ and Android 8.0+ Questions for Developer 1. What specific audio formats do you support? 2. Do you provide example code for the webview integration? 3. What happens if the user force-quits the app?** (Expected: playback stops) 4. How do you handle iOS background network restrictions? 5. What is your approach to offline storage limits? 6. Do you provide automated tests? 7. What is included in post-delivery support? 8. Can you provide references or similar projects?