protendai/nativephp-media
NativePHP Media brings image, audio, and video handling to your NativePHP desktop apps: pick and store files, generate thumbnails and conversions, and manage media libraries with a simple, Laravel-style API.
NATIVEPHP_MEDIA_LIBRARY = true / audio / video). Apps that only play bundled files or remote URLs ship with no Google Play photo/video permission declaration and no iOS Music/Photos usage strings. Decide per product whether library access is actually a feature — every "no" shrinks the privacy policy, the store listing disclosures, and review friction.setQueue/skipTo/next/previous), playback resumption from the system resume card and media buttons, iOS limited-library and Android 14 partial video access, configurable usage descriptions. What is not here (DRM, adaptive streaming, downloads, editing) becomes your roadmap, not an integration surprise.FakeBridge helpers (withMedia(), assertMediaQueued(), assertVideoOpened(), assertMediaPermissionRequested()) plus a Pest suite mean media flows can be asserted in CI instead of manually on physical devices — a measurable reduction in regression cost per release.Adopt when:
Look elsewhere (or scope out) when:
Adoption guardrails: pin the exact version, read the config keys (library, usage_descriptions) before enabling library access, run the nativephp-media-config publish step, and note that nativephp:media:configure replaces the old nativephp:media:enable-pip compile hook in any existing integration docs.
To executives (one paragraph): This package gives our Laravel app real native media playback — background audio with lock-screen and Bluetooth controls, resumable queues, and video with picture-in-picture — on both iOS and Android, without standing up a separate native team. It's MIT-licensed and it ships with device library access off by default, so apps that only stream their own content carry no extra Google Play permission declarations and no expanded privacy scope. The cost is integration plus device QA; the risk is that it's a young v1.0.0 dependency, which we mitigate by pinning the version and treating upgrades as reviewed changes.
To engineering (summary): v1.0.0 covers the parts that are expensive to get right: audio session lifecycle (including proper deactivation so other apps' audio resumes), media session and notification/Bluetooth transport controls, per-item resume positions saved for the outgoing track rather than the incoming one, Android 14 partial video access, iOS limited-library results, and activity/service reconnection — events are now buffered when the host activity is gone and replayed when it returns, and queued commands are no longer replayed after a failed service connection. The JS library is typed with a function per bridge function and event constants; config is publishable via the nativephp-media-config tag; FakeBridge assertions plus the Pest suite give us CI coverage. Two things to verify on integration: the Android media session is now scoped to playback commands only (third-party onAddMediaItems no longer trusts foreign URIs), and the single post_compile hook is nativephp:media:configure, anchored to com.protendai.media.VideoActivity. Minimum iOS is 16.0, and native logs no longer carry titles, paths, or URIs — useful for our data-handling review.
How can I help you explore Laravel packages today?