Demonstration apps for the cordova-plugin-audioinput v2.0 plugin, showcasing both Cordova and Capacitor implementations.
This demo repository now includes two complete demo applications:
- Cordova Demo (root directory) - Classic Cordova implementation
- Capacitor Demo (
capacitor-demo/) - Modern React + TypeScript implementation
Both demos showcase the same plugin features but with different architectures and technologies.
Location: Root directory Technologies: Vanilla JavaScript, HTML, CSS Platforms: Android, iOS, Browser
Features:
- 4 demo modes: Events, Web Audio, WAV, File Recording
- Updated to latest Cordova platforms (Android 14.0, iOS 7.1.1)
- Modern dark theme UI with CSS animations
- Memory leak fixes and performance improvements
- ES6+ JavaScript with arrow functions and modern syntax
Getting Started:
# Install dependencies
npm install
# Add platforms (versions will be pulled from package.json)
cordova platform add android
cordova platform add ios
# Or add specific versions
cordova platform add android@14.0.0
cordova platform add ios@7.1.1
# Run on Android
cordova run android
# Run on iOS
cordova run iosLocation: capacitor-demo/
Technologies: React 19, TypeScript 5, Vite 7, Capacitor 7
Platforms: Android, iOS, Web
Features:
- Modern React + TypeScript architecture
- Component-based demos with type safety
- Beautiful gradient UI with animations
- Vite for fast development and builds
Getting Started:
cd capacitor-demo
# Install dependencies
npm install
# Development mode
npm run dev
# Build and sync
npm run build
npx cap sync
# Open in Android Studio
npx cap open android
# Open in Xcode
npx cap open iosBoth demo apps showcase:
- Events Demo - Capture raw audio data and process with Web Audio API
- Web Audio Demo - Direct AudioNode streaming to speakers
- WAV Demo - Encode captured audio to WAV format
- File Demo - Record and save audio files to device storage
- Android 5.0+ (API 22+)
- iOS 13.0+
- Browser (limited features)
- Real-time microphone capture
- Multiple audio sources (Default, Camcorder, Unprocessed, Voice Communication, etc.)
- Configurable sample rates and buffer sizes
- Web Audio API integration
- File recording with WAV encoding
- Permission handling
- TypeScript definitions (Capacitor)
- Promise-based API (Capacitor)
- Event-based API (Cordova)
- β Updated to cordova-plugin-audioinput v2.0.0
- β Updated Android platform to 14.0.0 (from 7.0.0) - Targets Android 15/SDK 35
- β Updated iOS platform to 7.1.1 (from 4.5.4)
- β Updated cordova-plugin-file to 8.1.3
- β Removed deprecated plugins (cordova-plugin-compat, cordova-plugin-splashscreen)
- β Removed external CSS dependencies (W3.CSS)
- β Fixed memory leaks in events and file demos
- β Fixed typos in error messages
- β Complete CSS overhaul with modern dark theme
- β Modernized JavaScript with ES6+ syntax (const/let, arrow functions, template literals)
- β Added visual feedback and status indicators
- β Removed icon/splash screen configurations (simpler demo setup)
- β¨ Brand new React + TypeScript demo app
- β¨ Modern component-based architecture
- β¨ Beautiful gradient UI design
- β¨ Type-safe AudioInput API
- β¨ Vite for fast development
- β¨ Ready for Android and iOS
The Cordova demo uses traditional web technologies and is located in the root directory:
www/
βββ index.html # Main menu
βββ events-demo.html # Events demo
βββ webaudio-demo.html # Web Audio demo
βββ wav-demo.html # WAV encoding demo
βββ file-demo.html # File recording demo
βββ css/
β βββ app.css # Enhanced styles
βββ js/
βββ events-demo.js
βββ webaudio-demo.js
βββ file-demo.js
βββ wav-demo.js
βββ utils.js
The Capacitor demo is a modern React app with TypeScript:
capacitor-demo/
βββ src/
β βββ App.tsx # Main app with navigation
β βββ App.css # Modern gradient styles
β βββ components/
β β βββ EventsDemo.tsx
β β βββ WebAudioDemo.tsx
β β βββ WavDemo.tsx
β β βββ FileDemo.tsx
β βββ main.tsx
βββ android/ # Android platform
βββ capacitor.config.ts # Capacitor config
βββ package.json
βββ tsconfig.json
This project is open-source, and contributions are welcome! Please ensure your changes maintain backward compatibility.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Created by: @edimuj
- App icon: @richardbmx