Native extensions that take Adobe AIR further.
Klug develops native extensions for Adobe AIR on iOS, Android and macOS: camera, two-way voice with echo cancellation, push and device APIs. Our extensions run in production in our own apps, such as the PetCam App.
var media:CameraStreamANE = CameraStreamANE.instance; if ( media.isSupported ) { // camera, H.264 and RTMP in one native session media.startPublish( "rtmp://your.server/live", "station-1", 640, 480, 12, 800 ); }
Eight extensions, one way of working
Each extension is a singleton with an isSupported check, so the same ActionScript runs on every supported platform.
KlugMedia
Camera, two-way voice and echo cancellation in one native session, streaming H.264 and Opus over standard RTMP.
KlugPush
Remote push notifications for AIR apps on the Mac, with permission status and a shortcut to the system settings.
KlugKeychain
Secure key/value storage in the system keychain that survives uninstalling and reinstalling the app.
KlugTorch
Detects whether a device has a camera light and switches it on and off while the camera is streaming.
KlugDeviceId
A stable identifier per device on Android and iOS, for example to recognise a device again after a reinstall.
KlugDeviceType
Reliable phone or tablet detection from the system itself, independent of orientation and window size.
KlugBlackScreen
Restores the display on Android after a system window, such as a permission prompt, has closed.
KlugLayout
Landscape on both sides for Android tablets, turning with the device.
KlugMedia
AIR does not currently provide an up-to-date implementation for real-time media streaming. KlugMedia adds it as a native extension: camera, microphone, encoder and echo cancellation run in one native session, and ActionScript only sends commands.
It comes with matching server software, designed together with the extension: stream handling, reliable reconnects, the two-way voice relay and live viewing in a web browser.
- Camera capture and H.264 publishing
- Native H.264 receive and display, drawn over the stage
- Two-way Opus voice with hardware echo cancellation
- Native preview, camera switch, torch and zoom
- Snapshots straight from the camera image
- MP4 recording on the streaming server
- Standard RTMP
- Coming soon: iPad apps on the Mac, one build for iPhone, iPad and Mac
// play a remote stream natively media.startReceive( "rtmp://your.server/live", "station-1", 0, 0, 640, 480, 0, CameraStreamANE.RECEIVE_FIT ); // two-way voice with echo cancellation var voice:OpusVoiceBridge = new OpusVoiceBridge( new NativeOpusCodec(), 48000, 1, 960 ); voice.setVoiceProcessing( true ); voice.start();
Klug Streaming Server
KlugMedia comes with its own server software, developed together with the extension and tuned for AIR apps and native extensions. Client and server were designed as one system, which is why streams start quickly and keep running on weak networks.
Live video and voice
H.264 video and Opus voice from the camera app to every viewer, with two-way voice in real time.
Reliable connections
Clean stream starts and stops, viewers who can wait for a stream, and recovery after a network drop or a server restart.
Viewing in the browser
The same live stream, picture and sound, in any modern web browser, protected by account login.
MP4 recording
Streams recorded on the server as MP4 files, picture and sound, ready to play in the app or the browser.
Private by design
Every account has its own streams, kept apart from all others.
In production
Runs our apps for customers in Europe and the Americas, on standard Linux cloud servers.
How we build extensions
Native first
Time-critical work runs in native code on each platform. ActionScript only sends commands and receives status, so apps stay smooth on older devices too.
Proven in production
Our extensions are used by real customers in our PetCam App, our proof of concept, on the App Store, Google Play and the Mac, on current and older devices.
Client and server as one
For media, the extension and the server software are developed together, which is why streams start fast and recover on their own.
Questions about AIR native extensions
What is an ANE (AIR Native Extension)?
An ANE is a package that adds native iOS, Android or macOS code to an Adobe AIR app. The app calls it from ActionScript, and the extension does the work in native code on the device.
Which platforms do Klug extensions support?
Klug extensions run on iOS, Android and macOS. Each extension has an isSupported check, so the same ActionScript can stay in a cross-platform app. The supported platforms of every extension are listed on its page.
Which AIR SDK do the extensions need?
The extensions are built for the HARMAN AIR SDK 51.x.
Can an Adobe AIR app stream live video with two-way voice?
Yes, with KlugMedia. Camera, microphone, H.264 encoder and echo cancellation run in one native session, video goes out over standard RTMP, and two-way voice uses Opus.
What does the Klug Streaming Server add?
The Klug Streaming Server was built together with KlugMedia. It handles the streams, relays the two-way voice, delivers the live stream to web browsers, records MP4 files and recovers after network drops.
Are the extensions used in real apps?
Yes. Our PetCam App uses them every day on the App Store, Google Play and the Mac, on current and older devices. It is our proof of concept.
Can Klug build a native feature for my AIR app?
Yes. We develop native features for AIR apps, from a single extension to a complete streaming solution. Write to [email protected].
Interested in working with us?
Whether you need one of our extensions, a native feature for your AIR app, or a complete streaming solution, we'd like to hear from you.