Download the PHP package theunwindfront/nativephp-audio without Composer

On this page you can find all versions of the php package theunwindfront/nativephp-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 nativephp-audio

NativePHP Audio Player Plugin

Latest Version on Packagist Total Downloads License

A premium NativePHP plugin for professional audio playback on mobile devices (Android & iOS). This plugin provides deep integration with native OS features like MediaSession, background services, and remote controls.

✨ Features

🚀 Installation

📖 Usage

PHP Interface (Livewire / Controller)

⚡ JavaScript Bridge

If you are building a SPA (Inertia/Vue/React) or using Alpine.js, you can use the JavaScript bridge directly.

First, include the bridge in your layout:

Then, use the audio helper:

📡 Event Synchronization

This plugin dispatches powerful Laravel events that you can listen to in your application:

Event Description
PlaybackStarted Fired when audio actually begins playing.
PlaybackProgressUpdated Heartbeat event with position and duration.
PlaylistTrackChanged Fired on auto-advance or manual track skip.
AudioFocusLost Fired when another app takes over audio (e.g. phone call).
RemotePlayReceived Fired when the user hits 'Play' on headphones/lockscreen.
SleepTimerExpired Fired when the scheduled sleep timer hits zero.

🛠 Advanced Features

Background Sync

When your app returns from the background, you can "drain" any missed events that occurred while the PHP process was suspended:

Absolute Local Paths

Unlike standard web players, this plugin has direct filesystem access. On Android, it even requests READ_MEDIA_AUDIO permissions automatically.

📋 API Reference

Method Parameters Description
play string $url, array $options Play/Restart audio
load string $url, array $options Prepare audio without playing
setPlaylist array $tracks, bool $autoPlay, int $idx Set native queue
next / previous - Navigate playlist
skipTo int $index Jump to specific track
setVolume float $level (0.0 - 1.0) Set player volume
setPlaybackRate float $rate (0.25 - 4.0) Set playback speed
setSleepTimer int $seconds Schedule a shutdown
cancelSleepTimer - Stop the active timer
getState - Get full status object
getPlaylist - Get full playlist state
drainEvents - Get background events

📱 Version Support

👥 Credits

🤝 Support

For questions or issues, contact [email protected] or open a GitHub Issue.

📄 License

The MIT License (MIT). Please see License File for more information.


All versions of nativephp-audio with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
nativephp/mobile Version ^3.0
illuminate/support Version ^11.0|^12.0|^13.0
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 theunwindfront/nativephp-audio contains the following files

Loading the files please wait ...