Download the PHP package pushinbr/pam-native-audio without Composer

On this page you can find all versions of the php package pushinbr/pam-native-audio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pam-native-audio

**Voice notes that play, queue and route like a messenger.**
Headless native audio for PAM Native: ExoPlayer and AVQueuePlayer with a native queue, pitch-preserving speed, proximity earpiece routing, pushed progress events and the voice recorder. [![Packagist](https://img.shields.io/packagist/v/pushinbr/pam-native-audio?label=packagist&color=f53003)](https://packagist.org/packages/pushinbr/pam-native-audio) [![Latest release](https://img.shields.io/github/v/release/push-in/pam-native-audio?label=release&color=e3a008)](https://github.com/push-in/pam-native-audio/releases/latest) ![PHP 8.5](https://img.shields.io/badge/php-8.5-777bb4) [![License](https://img.shields.io/github/license/push-in/pam-native-audio?color=1f6feb)](LICENSE) [Install](#install) · [Quick example](#quick-example) · [Platforms](#platform-support) · [Permissions](#requirements) · [Docs](#docs) · [Issues](https://github.com/push-in/pam-native-audio/issues)

Install

Inside a PAM Native project, add only this capability:

The package is a PAM Native plugin discovered from Composer; nothing is added to pam-native.json. New to PAM? Create a project with pam init my-app --template native (see the PAM Native overview), then come back here.

Quick example

Event handlers run on the PHP worker; writing component properties from them re-renders only that component. The queue, auto-advance, the Zé Chat player and every method are in the example/.

Platform support

Platform Support Notes
Android API 24+ Media3 ExoPlayer, datasource and database 1.10.1; 64 MiB LRU cache in cacheDir/pam-audio-cache
iOS 15.0+ AVQueuePlayer + AVAudioSession (AVFoundation, CoreMedia); not validated on a device yet
PAM Native 1.46.0 to < 2.0.0 From pam-native.plugin.json; PHP 8.5+

Permissions and requirements

Platform Declared by the plugin
Android android.permission.RECORD_AUDIO (recorder), MODIFY_AUDIO_SETTINGS (communication mode for the earpiece), WAKE_LOCK (proximity screen-off); the AAR manifest adds INTERNET and ACCESS_NETWORK_STATE for remote sources
iOS NSMicrophoneUsageDescription ("Record voice messages.")

Playback needs no runtime permission. The player requests transient audio focus and pauses when focus is lost, on interruptions (a phone call) and when headphones are unplugged. The package does not declare the iOS audio background mode, so iOS suspends playback when the app goes to the background unless another plugin (for example pam-native-calls) or your host declares it. Full platform notes: docs/platform-notes.md.

What you can build

PHP never polls: the native side pushes compact events.

Best for Voice notes, podcast snippets, short audio messages, sound previews
Native path Media3 ExoPlayer 1.10 on Android · AVQueuePlayer + AVAudioSession on iOS
Application model Composer package + generated native integration (audio-player module)
Design rule Headless: no UI bundled; your component renders the bubble and waveform

Voice recorder

Moved from the PAM Native core in 1.46 (Pam\Native\System\AudioRecorder is a deprecated alias for 1.46 only):

Sources

A source is either an http(s):// URL (at most 4096 bytes) or a path relative to the PAM file sandbox (at most 1024 bytes, no leading /, no .., no \, no scheme): filesDir/pam-files on Android, Application Support/pam-files on iOS, the same space as FileReference::$path, AudioRecorder and pam-native-media. A recorder file://…/pam-files/voice/1.m4a URI must be reduced to voice/1.m4a before playing it.

Compatibility

pushinbr/pam-native-audio pushinbr/pam-native Android iOS
0.3.x >=1.46.0 <2.0.0 (manifest) API 26+ 15+
0.2.x >=1.0.35 <2.0.0 (tested with 1.14.x) API 26+ 15+
0.1.x >=1.0.35 <2.0.0 API 26+ Not supported

Tests

The instrumented suite plays generated WAV files through ExoPlayer: queue auto-advance with progress and end events, pause/resume/seek/rate on the live player, single current player, proximity earpiece routing (voice stream, audio mode, route events) and failure handling. ios/Tests/AudioPlayerTests.swift mirrors it with XCTest.

Docs

Part of the PAM ecosystem

PAM runs PHP natively on servers, desktops and phones. This repository is one piece of it.

PAM PAM Desktop PAM Native Ecosystem
the runtime and CLI native desktop apps in PHP native Android and iOS apps in PHP every official package and plugin

Docs: push-in.github.io/pam-docs · Issues

Apache License 2.0 · Made in Brazil by Pushin


All versions of pam-native-audio with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
pushinbr/pam-native Version ^1.53.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pushinbr/pam-native-audio contains the following files

Loading the files please wait ...