Open Sound Control (OSC)
weswecan
NativePHP^3iOS15.0+Android21+PHP^8.2
Send and receive OSC messages over UDP on iOS and Android — for show control, audio, lighting, Arduino, and ESP32 workflows, with PHP facades, Swift/Kotlin bridges, and typed JavaScript clients.
Features
- UDP-based OSC messaging (no TCP)
- Multiple simultaneous listeners with distinct IDs
- Typed argument support (int, float, string, blob)
- Bundle transmission
- Local address discovery
- Foreground-first lifecycle handling
- Event-driven architecture (JavaScript and PHP)
Installation
composer require weswecan/nativephp-mobile-osc
php artisan native:plugin:register weswecan/nativephp-mobile-osc
Compatibility
| Platform | Minimum Version |
|---|---|
| NativePHP | ^3 |
| iOS | 15.0+ |
| Android | API 21+ |
| PHP | ^8.2 |
Events
OscMessageReceived— incoming OSC messageOscBundleReceived— incoming OSC bundleOscListenerStarted— listener started successfullyOscListenerStopped— listener stoppedOscMessageSent— outgoing message confirmedOscError— error during send or receive