PAM Native Media
Start here
Section titled “Start here”Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | shpam doctorpam init my-app --template nativecd my-apppam composer require pushinbr/pam-native-mediapam doctorpam native dev$media = new Media();$media->probe('media/clip.mp4', fn (?MediaInfo $info, ?string $error) => null);$media->thumbnail('media/clip.mp4', 'thumbs/clip.jpg', 640, 360, fn (?string $path, ?string $error) => null);Media probes and thumbnails without loading bytes into PHP; MediaInfo
normalizes type, dimensions, duration, and orientation; ThumbnailFormat
selects output. Paths are canonical sandbox-relative values. Images honor EXIF
orientation and video thumbnails track transforms.
Embedded camera
Section titled “Embedded camera”return CameraView::make() ->facing(CameraFacing::Back) ->mode(CameraMode::Photo) ->flash(CameraFlashMode::Off) ->captureRevision($photoRevision) ->onEvent(fn (CameraEventKind $kind, ?CameraCapture $capture, string $message) => null);Revision commands prevent declarative re-renders from repeating capture.
Camera output combinations are mode-specific for device compatibility. Request
camera/microphone permission, bound recording duration and storage, and handle
returned paths through normal FileReference APIs.
MediaKind classifies probed results. MediaPluginProvider registers the
module and camera view automatically during PAM plugin discovery.